import Component from '@glimmer/component'; import { type ComponentLike } from '@glint/template'; import { type ModelsTableDataItem } from 'ember-models-table/types/models-table-data-item.type'; import { type RowGroupToggleSignature } from '../../../../interfaces/components/models-table/themes/default/row-group-toggle-signature.interface'; import { type RowSignature } from '../../../../interfaces/components/models-table/themes/default/row-signature.interface'; /** * Table body row is used within {@link DefaultTheme.TableBody | TableBody}. * * Usage example: * * ```html * * * * {{#each Body.visibleContent as |record index|}} * * {{/each}} * {{! ... }} * * {{! ... }} * * {{! .... }} * * ``` * * Usage with a block context: * * ```html * * * * {{#each Body.visibleContent as |record index|}} * * {{#each MT.visibleProcessedColumns as |column|}} * * {{/each}} * * {{/each}} * {{! ... }} * * {{! ... }} * * {{! .... }} * * ``` * * **Important!** You must bound `record` and `index` to the `row`. * * `ModelsTableTableRow` yields references to the following contextual components: * * * {@link DefaultTheme.Cell} - component represents each row's cell * * {@link DefaultTheme.RowGroupToggle} - component is used to toggle rows group visibility * * {@link DefaultTheme.RowSelectCheckbox} - component is used to toggle row selection * * {@link DefaultTheme.ExpandToggle} - component is used to expand or collapse row * * Check own docs for each component to get detailed info. * * References to the following properties are yielded: * * * {@link isEditRow} - `true` if row in the Edit-mode * * {@link isFirstGroupedRow} - `true` if row is first in the rows group (flag used when rows grouping is used) * * {@link rowspanForFirstCell} * * {@link shouldShowGroupToggleCell} * * References to the following actions are yielded: * * * {@link editRow} - action to set row to the Edit-mode * * {@link saveRow} - action to save row and turn off Edit-mode * * {@link cancelEditRow} - action to cancel changes done to the row and turn off Edit-mode */ export default class Row extends Component { /** * @default '' */ protected get rowSelectedClass(): string; /** * @default '' */ protected get rowExpandedClass(): string; get rowspanForFirstCell(): number; get visibleGroupedItems(): ModelsTableDataItem[]; /** * @default [] */ get selectedGroupedItems(): any[]; /** * @default [] */ get expandedGroupedItems(): any[]; /** * @default [] */ get expandedGroupItems(): any[]; /** * @default false */ get isFirstGroupedRow(): boolean; /** * @default false */ get isSelected(): boolean; /** * @default false */ get isExpanded(): boolean; /** * @default false */ get shouldShowGroupToggleCell(): boolean; protected get rowGroupToggleComponent(): ComponentLike | ComponentLike; /** * Is the row in edit mode * * @default false */ isEditRow: boolean; /** * @event onClick */ protected onClick(): boolean; /** * @event onDoubleClick */ protected onDoubleClick(): void; /** * @event onEnter */ protected onEnter(): void; /** * @event onLeave */ protected onLeave(): void; /** * @event doToggleGroupedRows */ doToggleGroupedRows(): boolean; /** * Place a row into edit mode * * @event editRow */ editRow(): void; /** * Indicate a row has been saved, the row is no longer in edit mode * * @event saveRow */ saveRow(): void; /** * Indicate the edit on the row has been cancelled, the row is no longer in edit mode * * @event cancelEditRow */ cancelEditRow(): void; } //# sourceMappingURL=row.d.ts.map