carbon-components-angular
Version:
Next generation components
91 lines (87 loc) • 3.56 kB
TypeScript
/**
*
* carbon-angular v0.0.0 | table-body.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 { Observable } from "rxjs";
import { TableRowSize } from "../table.types";
import * as i0 from "@angular/core";
export declare class TableBody {
protected i18n: I18n;
model: TableModel;
/**
* Controls whether to enable multiple or single row selection.
*/
enableSingleSelect: boolean;
set expandButtonAriaLabel(value: string | Observable<string>);
get expandButtonAriaLabel(): string | Observable<string>;
set checkboxRowLabel(value: string | Observable<string>);
get checkboxRowLabel(): string | Observable<string>;
/**
* Controls whether to show the selection checkboxes column or not.
*/
showSelectionColumn: boolean;
/**
* Size of the table rows.
*/
size: TableRowSize;
/**
* 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 if a single row is selected.
*
* @param ({model: this.model, selectedRowIndex: index})
*/
selectRow: EventEmitter<Object>;
/**
* Emits if a single row is deselected.
*
* @param ({model: this.model, deselectedRowIndex: index})
*/
deselectRow: EventEmitter<Object>;
/**
* Emits if a row item excluding expandButtons, checkboxes, or radios is clicked.
*/
rowClick: EventEmitter<number>;
protected _checkboxRowLabel: Overridable;
protected _expandButtonAriaLabel: Overridable;
constructor(i18n: I18n);
/**
* Triggered when a single row is clicked.
* Updates the header checkbox state.
* Emits the `selectRow` or `deselectRow` event.
*/
onRowCheckboxChange(index: number): void;
onRowClick(index: number): void;
getCheckboxRowLabel(): Observable<string>;
getExpandButtonAriaLabel(): Observable<string>;
firstExpandedDataInRow(row: any): any;
shouldExpandAsTable(row: any): any;
static ɵfac: i0.ɵɵFactoryDeclaration<TableBody, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TableBody, "[cdsTableBody], [ibmTableBody]", never, { "model": "model"; "enableSingleSelect": "enableSingleSelect"; "expandButtonAriaLabel": "expandButtonAriaLabel"; "checkboxRowLabel": "checkboxRowLabel"; "showSelectionColumn": "showSelectionColumn"; "size": "size"; "selectionLabelColumn": "selectionLabelColumn"; "skeleton": "skeleton"; }, { "selectRow": "selectRow"; "deselectRow": "deselectRow"; "rowClick": "rowClick"; }, never, ["*"], false>;
}