carbon-components-angular
Version:
Next generation components
106 lines (102 loc) • 4.14 kB
TypeScript
/**
*
* carbon-angular v0.0.0 | table-row.component.d.ts
*
* Copyright 2014, 2024 IBM
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { EventEmitter } from "@angular/core";
import { TableModel } from "../table-model.class";
import { I18n, Overridable } from "carbon-components-angular/i18n";
import { TableItem } from "../table-item.class";
import { Observable } from "rxjs";
import { TableRowSize } from "../table.types";
import * as i0 from "@angular/core";
export declare class TableRowComponent {
protected i18n: I18n;
/**
* `TableModel` with data the table is to display.
*/
model: TableModel;
row: TableItem[];
expanded: boolean;
expandable: boolean;
selected: boolean;
/**
* Size of the table rows.
*/
size: TableRowSize;
/**
* Controls whether to enable multiple or single row selection.
*/
enableSingleSelect: boolean;
set expandButtonAriaLabel(value: string | Observable<string>);
get expandButtonAriaLabel(): string | Observable<string>;
set checkboxLabel(value: string | Observable<string>);
get checkboxLabel(): string | Observable<string>;
/**
* Controls whether to show the selection checkboxes column or not.
*/
showSelectionColumn: boolean;
/**
* Shows or hide the checkbox in the selection column when `showSelectionColumn`
* is set to true
*/
showSelectionColumnCheckbox: boolean;
/**
* Used to populate the row selection checkbox label with a useful value if set.
*
* Example:
* ```
* <cds-table [selectionLabelColumn]="0"></cds-table>
* <!-- results in aria-label="Select first column value"
* (where "first column value" is the value of the first column in the row -->
* ```
*/
selectionLabelColumn: number;
skeleton: boolean;
/**
* Emits when the row is selected.
*/
selectRow: EventEmitter<any>;
/**
* Emits when the row is deselected.
*/
deselectRow: EventEmitter<any>;
/**
* Emits when the row is expanded
*/
expandRow: EventEmitter<any>;
/**
* Emits when a row is clicked regardless of `enableSingleSelect` or `showSelectionColumn`.
* Should only get emitted when a row item is selected excluding expand buttons,
* checkboxes, or radios.
*/
rowClick: EventEmitter<any>;
get selectedClass(): boolean;
get parentRowClass(): boolean;
get expandableRowClass(): boolean;
get selectableClass(): boolean;
get isParentRow(): boolean;
get isAccessible(): number;
protected _checkboxLabel: Overridable;
protected _expandButtonAriaLabel: Overridable;
constructor(i18n: I18n);
onHostClick(): void;
onRowClick(): void;
onSelectionChange(): void;
getCheckboxLabel(): Observable<string>;
getExpandButtonAriaLabel(): Observable<string>;
static ɵfac: i0.ɵɵFactoryDeclaration<TableRowComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TableRowComponent, "[cdsTableRow], [ibmTableRow]", never, { "model": "model"; "row": "row"; "expanded": "expanded"; "expandable": "expandable"; "selected": "selected"; "size": "size"; "enableSingleSelect": "enableSingleSelect"; "expandButtonAriaLabel": "expandButtonAriaLabel"; "checkboxLabel": "checkboxLabel"; "showSelectionColumn": "showSelectionColumn"; "showSelectionColumnCheckbox": "showSelectionColumnCheckbox"; "selectionLabelColumn": "selectionLabelColumn"; "skeleton": "skeleton"; }, { "selectRow": "selectRow"; "deselectRow": "deselectRow"; "expandRow": "expandRow"; "rowClick": "rowClick"; }, never, ["*"], false>;
}