UNPKG

carbon-components-angular

Version:
102 lines (98 loc) 4.14 kB
/** * * carbon-angular v0.0.0 | table-head.component.d.ts * * Copyright 2014, 2025 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, AfterViewInit } from "@angular/core"; import { TableModel } from "../table-model.class"; import { I18n, Overridable } from "carbon-components-angular/i18n"; import { Observable } from "rxjs"; import * as i0 from "@angular/core"; /** * A subcomponent that creates the thead of the table * * ## Basic usage * * ```html * <thead cdsTableHead [model]="model"></thead> * ``` */ export declare class TableHead implements AfterViewInit { protected i18n: I18n; model: TableModel; showSelectionColumn: boolean; enableSingleSelect: boolean; selectAllCheckboxSomeSelected: boolean; selectAllCheckbox: boolean; skeleton: boolean; stickyHeader: boolean; showExpandAllToggle: boolean; /** * Setting sortable to false will disable all headers including headers which are sortable. Is is * possible to set the sortable state on the header item to disable/enable sorting for only some headers. */ sortable: boolean; set checkboxHeaderLabel(value: string | Observable<string>); get checkboxHeaderLabel(): string | Observable<string>; set sortDescendingLabel(value: string | Observable<string>); get sortDescendingLabel(): string | Observable<string>; set sortAscendingLabel(value: string | Observable<string>); get sortAscendingLabel(): string | Observable<string>; set filterTitle(value: string | Observable<string>); get filterTitle(): string | Observable<string>; /** * Emits an index of the column that wants to be sorted. */ sort: EventEmitter<number>; /** * Emits if all rows are selected. * * @param model */ selectAll: EventEmitter<TableModel>; /** * Emits if all rows are deselected. * * @param model */ deselectAll: EventEmitter<TableModel>; /** * Emits if all rows are expanded. * * @param model */ expandAllRows: EventEmitter<TableModel>; /** * Emits if all rows are collapsed. * * @param model */ collapseAllRows: EventEmitter<TableModel>; scrollbarWidth: number; protected _checkboxHeaderLabel: Overridable; protected _sortDescendingLabel: Overridable; protected _sortAscendingLabel: Overridable; protected _filterTitle: Overridable; constructor(i18n: I18n); ngAfterViewInit(): void; onSelectAllCheckboxChange(): void; onExpandAllRowsChange(expand: boolean): void; getCheckboxHeaderLabel(): Observable<string>; getSortDescendingLabel(): Observable<string>; getSortAscendingLabel(): Observable<string>; getFilterTitle(): Observable<string>; static ɵfac: i0.ɵɵFactoryDeclaration<TableHead, never>; static ɵcmp: i0.ɵɵComponentDeclaration<TableHead, "[cdsTableHead], [ibmTableHead]", never, { "model": "model"; "showSelectionColumn": "showSelectionColumn"; "enableSingleSelect": "enableSingleSelect"; "selectAllCheckboxSomeSelected": "selectAllCheckboxSomeSelected"; "selectAllCheckbox": "selectAllCheckbox"; "skeleton": "skeleton"; "stickyHeader": "stickyHeader"; "showExpandAllToggle": "showExpandAllToggle"; "sortable": "sortable"; "checkboxHeaderLabel": "checkboxHeaderLabel"; "sortDescendingLabel": "sortDescendingLabel"; "sortAscendingLabel": "sortAscendingLabel"; "filterTitle": "filterTitle"; }, { "sort": "sort"; "selectAll": "selectAll"; "deselectAll": "deselectAll"; "expandAllRows": "expandAllRows"; "collapseAllRows": "collapseAllRows"; }, never, ["*"], false>; }