import * as i0 from '@angular/core'; import { EventEmitter, OnInit, QueryList } from '@angular/core'; import { FormGroup, FormControl } from '@angular/forms'; import { SortDirection } from '@odx/angular/utils'; import * as i5 from '@odx/angular'; /** * CheckCellComponent provides a checkbox input within a table cell, allowing rows to be selected. * It is designed to be used in conjunction with a table component that manages state and header interactions, * particularly for functionalities like bulk actions. */ declare class CheckCellComponent { private readonly table; readonly element: i0.ElementRef; /** * Indicates whether the checkbox within the table cell is checked. * * @type {boolean} * @default false */ checked: boolean; /** * Event emitter that triggers when the checked state changes. It emits the new state of the checkbox. * * @emits {boolean} */ checkedChange: EventEmitter; /** * Updates the checked state of the checkbox and notifies the parent table component, typically to update * the state of a header checkbox or other related components. * @param {boolean} e - The new checked state. */ update(e: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_checked: unknown; } interface TableHeaderCell { title?: string; name: string; filter?: boolean; sortable?: boolean; check?: boolean; width?: string; } interface SortStatus { column: string; sortVariant?: SortDirection; } interface TableBodyCell { [key: string]: unknown; } type TableVariant = typeof TableVariant[keyof typeof TableVariant]; declare const TableVariant: { readonly DEFAULT: "default"; readonly STRIPED: "striped"; }; /** * HeaderTitleComponent provides the functionality for a table header cell, including sorting and checkbox * operations if applicable. It handles changes in sort state and emits relevant events to the table component * to manage sorting and selection state across the table. */ declare class HeaderTitleComponent implements OnInit { private readonly table; private readonly cdr; private readonly takeUntilDestroyed; private sortStatus; /** * The header cell item containing metadata like column name, sortability, and whether it should include a checkbox. * * @type {TableHeaderCell} */ item: TableHeaderCell; /** * FormGroup to manage the checkbox state within the header. * * @type {FormGroup} */ checkForm: FormGroup<{ check: FormControl; }>; /** * Computes and returns the current sort status of the column associated with this header. * * @returns {SortStatus} */ get getSortStatus(): SortStatus; /** * Returns the icon name for the current sorting status (ascending, descending). * * @returns {string} */ get sortIcon(): string; /** * Toggles the sorting status of the column and informs the table component of the change. */ sortColumn(): void; /** * Resets the sort status to unsorted. */ clearSortStatus(): void; /** * Returns the number of selected items in the column, used to determine checkbox state. * * @returns {number} */ get selected(): number; /** * Updates the component view, usually after a state change. */ check(): void; /** * Determines whether the checkbox should be marked as checked. * * @returns {boolean} */ get checked(): boolean; ngOnInit(): void; private checkBoxListener; get indeterminate(): boolean; protected get columnWidth(): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * TableCellDirective enhances an HTML td element by providing a role attribute with a value of "cell". * This directive is used to define a cell within a table. */ declare class TableCellDirective { readonly element: i0.ElementRef; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * TableRowDirective enhances an HTML tr element by providing a role attribute with a value of "row". * This directive is used to define a row within a table. */ declare class TableRowDirective { readonly element: i0.ElementRef; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * TableComponent is a dynamic table structure built for displaying complex data sets with sorting, filtering, * and checkable functionality. It provides configuration options through various inputs that allow the * customization of table behavior and presentation. * * This component is highly modular, integrating with other components such as `HeaderTitleComponent` for header * management, and using Angular forms for dynamic data filtering. * * @template T - The type of data that the table displays. */ declare class TableComponent implements OnInit { private readonly takeUntilDestroyed; readonly element: i0.ElementRef; /** * Specifies the table variant for CSS styling. * * @type {TableVariant | null} */ variant?: TableVariant | null; /** * Data array of type T that the table displays. * * @type {Signal} */ data: i0.InputSignal; /** * Message to display when no data is available. * * @type {Signal} */ noDataMessage: i0.InputSignal; /** * Configuration for table headers that controls behavior such as sorting, filtering, checkbox display, and width. * Should be in the same order as the columns in the template. * * @type {Signal} */ headerData: i0.InputSignal; /** * FormGroup to handle the dynamic filtering controls, each tied to a header cell that has filtering enabled. */ form: FormGroup; /** * Event emitter for when a column's sorting status changes. * * @emits {SortStatus} */ readonly sorted: EventEmitter; /** * Event emitter for when the table's filtering conditions change. * * @emits {{ [key: string]: string }} */ readonly filtered: EventEmitter<{ [key: string]: string; }>; /** * Event emitter for when a checkbox column's checked state changes. * * @emits {{ column: string; check: boolean }} */ readonly checked: EventEmitter<{ column: string; check: boolean; }>; /** * A QueryList of HeaderTitleComponent instances, each corresponding to a header cell in the table. * * @type {QueryList} */ headers: QueryList; ngOnInit(): void; /** * Clears the sorting status of all headers. */ clearSort(): void; private formListener; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "table[odxTable]", never, { "variant": { "alias": "variant"; "required": false; }; "data": { "alias": "data"; "required": true; "isSignal": true; }; "noDataMessage": { "alias": "noDataMessage"; "required": false; "isSignal": true; }; "headerData": { "alias": "headerData"; "required": true; "isSignal": true; }; }, { "sorted": "sorted"; "filtered": "filtered"; "checked": "checked"; }, never, ["tr"], true, never>; } declare class TableModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { CheckCellComponent, HeaderTitleComponent, TableCellDirective, TableComponent, TableModule, TableRowDirective, TableVariant }; export type { SortStatus, TableBodyCell, TableHeaderCell };