import * as _angular_core from '@angular/core';
import { Type, DestroyRef, AfterViewInit, OutputEmitterRef, AfterContentInit } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import { CdkDragMove, CdkDragEnd } from '@angular/cdk/drag-drop';
/**
* Values accepted by the `TableColumn`'s `align` property.
*
* ### Import
*
* ```typescript
* import { TableColumnHAlign } from '@talenra/ngx-base/table';
* ```
*
* @see {@link TableComponent}
*/
declare const TableColumnHAlign: {
readonly Center: "center";
readonly Left: "left";
readonly Right: "right";
};
/**
* Type of values accepted by the `TableColumn`'s `align` property.
* Used to configure horizontal alignment of content in table rows.
*
* ### Import
*
* ```typescript
* import { TTableColumnHAlign } from '@talenra/ngx-base/table';
* ```
*
* @see {@link TableComponent}
*/
type TTableColumnHAlign = (typeof TableColumnHAlign)[keyof typeof TableColumnHAlign];
/**
* Values accepted by Table's `selectionMode` property.
*
* ```html
*
* ```
*
* ### Import
*
* ```typescript
* import { TableSelectionMode } from '@talenra/ngx-base/table';
* ```
*
* @see {@link TableComponent}
*/
declare const TableSelectionMode: {
readonly None: "none";
readonly SingleRow: "single row";
readonly MultiRow: "multi row";
};
/**
* Type of values accepted by Table's `selectionMode` property.
*
* ### Import
*
* ```typescript
* import { TTableSelectionMode } from '@talenra/ngx-base/table';
* ```
*
* @see {@link TableComponent}
*/
type TTableSelectionMode = (typeof TableSelectionMode)[keyof typeof TableSelectionMode];
/**
* Type of table column width definition. Used to define optional min-/max-width of a column. Values are defined as CSS
* length units (e.g. '120px', '50%', 'auto').
*
* ### Import
*
* ```typescript
* import { TTableColumnWidth } from '@talenra/ngx-base/table';
* ```
*/
type TTableColumnWidth = {
min?: string;
max?: string;
};
/**
* Defines a column in the Table component.
*
* ```typescript
* protected readonly columns: TableColumn[] = [
* { identifier: 'author', label: 'Author' },
* { identifier: 'title', label: 'Title' },
* { identifier: 'pages': label: 'Pages', align: TableColumnHAlign.Right },
* { identifier: 'price', label: 'Price', align: TableColumnHAlign.Right },
* ];
* ```
*
* ### Import
*
* ```typescript
* import { ITableColumn } from '@talenra/ngx-base/table';
* ```
*
* @see {@link TableComponent}
*/
interface ITableColumn {
/** Unique identifier for the column. */
identifier: string;
/** Field name in the data object. Used to map the data object's field to the corresponding column. */
field: string;
/** Label displayed in the table's header. */
label?: string;
/**
* Horizontal alignment of content in the column. Note that this setting affects table body's cells (`td`) only.
* Header cells (`th`) are always left-aligned.
*/
hAlign?: TTableColumnHAlign;
/**
* Width of the column. Provide a CSS length unit string (e.g. `'250px'`) to define the exact width of the column or a
* range object (e.g. `{ min: '120px', max: '500px'}`). As the table is always the same width as its container,
* effective column width might deviate from the specified values.
*/
width?: string | TTableColumnWidth;
/**
* Custom renderer component. Use a renderer if rendering a simple string value does not match your requirements.
*
* @see {@link TableComponent#columns}
* @see {@link ITableCellRenderer}
*/
renderer?: Type;
/**
* Disables row selection for the column. Use to prevent interferences when implementing a custom renderer with
* event handlers.
*/
disableRowSelection?: boolean;
/** Determines whether the column is sortable. */
sortable?: boolean;
/**
* Determines whether the column is user-resizable. If set `true`, the user can resize the column width by dragging
* the column separator in the Table head.
*/
resizable?: boolean;
}
/**
* Represents a single data row. Table data is represented by an array of objects of this type (`ITableRow[]`).
*
* ```typescript
* protected readonly data: ITableRow[] = [
* {
* identifier: "e5472204-4410-479a-9e90-c591dc8329e5",
* author: "Gabrielle-Suzanne Barbot de Villeneuve",
* title: "La Belle et la Bête",
* isbn: "978-1-910-88006-7",
* },
* // ...
* ]
* ```
*
* ### Import
*
* ```typescript
* import { ITableRow } from '@talenra/ngx-base/table';
* ```
*
* @see {@link TableComponent}
*/
interface ITableRow {
/** Unique identifier for the row (e.g. existing id from DB, GUID or array index). */
identifier: string;
/** Determines whether the row is selected. */
isSelected?: boolean;
/**
* Data rendered in the table row. Each field of the object represents a table cell. Object keys must match column's
* `field`s.
*/
[field: string]: unknown;
}
/**
* Type of event emitted by the Table component when the row is un-/selected by the user.
*
* ### Import
*
* ```typescript
* import { ITableRowSelectionChange } from '@talenra/ngx-base/table';
* ```
*
* @see {@link TableComponent}
*/
interface ITableRowSelectionChange {
/** Reference to the affected row */
row: ITableRow;
/** Selection state of the row (selected or not) */
isSelected: boolean;
}
/**
* Type of event emitted by the Table component when the row is double-clicked by the user.
*
* ### Import
*
* ```typescript
* import { ITableRowDoubleClick } from '@talenra/ngx-base/table';
* ```
*
* @see {@link TableComponent}
*/
interface ITableRowDoubleClick {
/** Reference to the affected row */
row: ITableRow;
/** Mouse event */
event: MouseEvent;
}
/**
* Values accepted by TableSort's `direction` property.
**
* ### Import
*
* ```typescript
* import { TableSortDirection } from '@talenra/ngx-base/table';
* ```
*
* @see {@link TableComponent}
*/
declare const TableSortDirection: {
readonly Ascending: "ascending";
readonly Descending: "descending";
};
/**
* Type of values accepted by TableSorts's `direction` property.
*
* ### Import
*
* ```typescript
* import { TTableSortDirection } from '@talenra/ngx-base/table';
* ```
*
* @see {@link TableComponent}
*/
type TTableSortDirection = (typeof TableSortDirection)[keyof typeof TableSortDirection];
/**
* Type used by the sort property of the Table component to define the sorting column and direction.
*
* ### Import
*
* ```typescript
* import { ITableSortState } from '@talenra/ngx-base/table';
* ```
*
* @see {@link TableComponent}
*/
interface ITableSortState {
/** The column used for sorting. Must match a field name defined in TableColumn. */
field: string;
/** Selection state of the row (selected or not) */
direction: TTableSortDirection;
}
/**
* Type for custom translations used in Table component.
*
* ### Import
*
* ```typescript
* import { ITableTranslations } from '@talenra/ngx-base/table';
* ```
*
* @see {@link TableComponent#translations}
*/
interface ITableTranslations {
/** Message displayed if table has no entries. */
noEntries?: string;
}
/**
* Handles row selection for the TableComponent.
*
* @internal
*/
declare class TableSelection {
private table;
/** Checked state of the "select all" checkbox displayed when selection mode is "multi". */
selectAllChecked: boolean;
/** Indeterminate state of the "select all" checkbox displayed when selection mode is "multi". */
selectAllIndeterminate: boolean;
/**
* Index of the most recent row selected without shift key pressed. Used to select ranges (shift key, batch select).
*/
get selectionAnchor(): number | null;
set selectionAnchor(index: number | null);
private _selectionAnchor;
/**
* Range of the rows added to selection using range (shift key). Used to unselect these rows when a new range is
* selected.
*/
private selectionRange;
/** @internal */
constructor(table: TableComponent);
/**
* Handler for un-/selecting rows. Toggles the given row's selection state.
*
* Options: `cumulate` - If `true`, the given row's selection state will be toggled without affecting other rows.
* Otherwise, all other rows will be unselected.
*/
toggleRow(row: ITableRow, options?: {
cumulate: boolean;
}): void;
/**
* Handler for selecting a range of rows. Unselects all rows from a previous range selection (if existing) and then
* selects the rows in the current range.
*/
selectRange(row: ITableRow): void;
/** Handler for un-/selecting _all_ rows. */
selectAllRows(): void;
/** Update the "all" checkbox state. */
updateCheckboxState(): void;
/** Helper: Update a given row's selected state and emit a `rowSelectionChange` event. */
private updateRowState;
}
/** @internal */
type TCoords = {
row: number;
col: number;
};
/**
* Handles highlighting and keyboard navigation for the TableComponent.
*
* @internal
*/
declare class TableNavigation {
private table;
private selection;
/** Field having focus (keyboard) */
private get focus();
private set focus(value);
private _focus;
/** Field having hover (pointer) */
private hover;
/** Reference to the element the focus shall be returned to if not used by a specific table cell. */
private wrapperElm?;
/** Reference to table head element () */
private theadElm?;
/** Reference to table body element () */
private tbodyElm?;
/** CDK clipboard util */
private clipboard;
/** @internal */
constructor(table: TableComponent, selection: TableSelection);
/**
* Invoked by TableComponent after view is initialized to provide references to the relevant HTML elements (which are
* not available at construction time).
*/
init(wrapperElm: HTMLElement, thead: HTMLElement, tbody: HTMLElement): void;
/** Returns the relevant HTML element for a given table coordiante. */
private getElmAt;
/** Determines whether the row at a given index is highlighted. Typically used in template. */
isRowHovered(rowIndex: number): boolean;
/** Determines whether a given column head is highlighted. Typically used in template. */
isFieldHovered(cell: TCoords): boolean;
/**
* Handles hover and blur actions. Triggerd from the template.
* @param cell – The cell to highlight (hover) or null to remove highlighting completely (blur)
*/
onHover(cell: TCoords | null): void;
/**
* Focus handler. Bypasses focus setter method (which takes care about updating focus) as setting focus is done by
* the browser if `focus` event is triggered.
*/
onFocus(cell: TCoords): void;
/** Prevents the default browser behavior for certain keys. */
private preventScroll;
/** Dispatches key events */
handleKeydown(event: KeyboardEvent): void;
/** Handle copy-to-clipboard */
copyToClipboard(): void;
}
/**
* Interface for the visibility of the scroll indicators.
*
* @internal
*/
interface TableScrollIndicatorVisibility {
left: boolean;
right: boolean;
}
/**
* Controls the table's scroll indicator (gradient).
*
* Required as a pure CSS solution does not offer the flexibility needed for styling (we want the gradient to be
* transparent on _top_ of content and backgrounds).
*
* s. https://codepen.io/huijing/details/XBGaNQ
*
* @internal
*/
declare class TableScrollIndicator {
private destroyRef;
/** The scrolling element */
private element;
/** Determines whether the scroll indicators are visible. */
visibility: BehaviorSubject;
/** @internal */
constructor(element: HTMLElement, destroyRef: DestroyRef);
/** Adds subscription for window resize and element scroll. */
private init;
recalculate(): void;
}
/**
* Handles resizing of table columns.
*
* @internal
*/
declare class TableResize {
private table;
/** Reference to table head element () */
private theadElm?;
/** Reference to table body element () */
private tbodyElm?;
/** Initial width of the currently resizing column */
private initialWidth;
/** Indicates whether a resize operation (drag) is ongoing. */
isResizing: boolean;
/** @internal */
constructor(table: TableComponent);
/**
* Invoked by TableComponent after view is initialized to provide references to the relevant HTML elements (which are
* not available at construction time).
*/
init(thead: HTMLElement, tbody: HTMLElement): void;
/** Invoked when the drag handle is clicked. */
clicked(event: MouseEvent): void;
/** Invoked when drag handle is about to be dragged. */
dragStarted(columnIndex: number): void;
/** Invoked when drag action is in progress. */
dragMoved(columnIndex: number, event: CdkDragMove): void;
/** Invoked when drag action has ended. */
dragEnded(columnIndex: number, event: CdkDragEnd): void;
/**
* Helper: Evaluates the first cell of the column at a given index and returns its width in px. As the table might
* have a header row only (no data) or only data rows (no header), we need to check both thead and tbody elements.
*/
private getWidthOfColumn;
/** Update the table's columns data while updating the affected column's width. */
private updateColumnWidth;
}
/**
* The Table component renders tabular data.
*
* ### Basic usage example
*
* ```typescript
* // Component class
* import { ITableColumn, ITableRow } from '@talenra/ngx-base/table';
*
* protected readonly columns: ITableColumn[] = [
* { identifier: '0', field: 'author', label: 'Author' },
* { identifier: '1', field: 'title', label: 'Title' },
* { identifier: '2', field: 'isbn', label: 'ISBN' },
* ];
*
* protected readonly data: ITableRow[] = [
* {
* identifier: "e5472204-4410-479a-9e90-c591dc8329e5",
* author: "Gabrielle-Suzanne Barbot de Villeneuve",
* title: "La Belle et la Bête",
* isbn: "978-1-910-88006-7",
* },
* {
* identifier: "6cf48942-341d-4b3d-b76a-be444a3f46dc",
* author: "Mary Shelley",
* title: "Frankenstein; or, The Modern Prometheus",
* isbn: "978-1-530-27844-2",
* },
* {
* identifier: "0e1ea95b-5e9b-4638-be2d-419c1455ea2e",
* author: "Herman Melville",
* title: "Moby-Dick; or, The Whale",
* isbn: "978-1-530-69790-8",
* }
* ]
* ```
*
* ```html
*
*
* ```
*
* ### Column configuration
*
* Input property `columns` is key to to configure the Table and assign keys from your data object to Table columns.
*
* ### Custom cell-renderer
*
* String values are supported out of the box. Provide a cell-renderer component if you need to display more complex
* data or UI (icons, checkboxes, links, graphs, …). The custom cell-renderer component has access to the cell's
* context.
*
* ### Features
*
* - Sorting (s. {@link #columns|columns})
* - Optional horizontal alignment per column (s. {@link #columns|columns})
* - Optional column min-/max-width per column (s. {@link #columns|columns})
* - Optional custom cell renderer component to display non-string content (s. {@link #columns|columns})
* - Optional custom translations (s. {@link #translations|translations})
* - Optional row selection (none, single or multi) (s. {@link #selectable|selectable})
* - Skeleton loader (s. {@link #isLoading|isLoading})
* - Responsive mode: Display rows "card style" on small viewports (breakpoint is currently not configurable) (s. {@link #useResponsiveMode|useResponsiveMode})
* - Scroll indicators (vertical gradients if content has overflow)
* - Support for appearance schemes and color themes
*
* ### Layout
*
* The width of tables is controlled by the containing element. Tables are the same width as their container.
*
* ### Import
*
* ```typescript
* import { TableComponent } from '@talenra/ngx-base/table';
* ```
*
* ../../#/table
*/
declare class TableComponent implements AfterViewInit {
/**
* Array of column definitions. Used to configure the table's columns including the column header.
*
* While the `field` property is used to map provided data to columns, the `label` property is displayed to the user
* in the column header. Please refer to {@link ITableColumn} for full documentation.
*
* ```typescript
* // Component class
* import { ITableColumn, TableColumnHAlign, ITableRow } from '@talenra/ngx-base/table';
*
* protected readonly columns: ITableColumn[] = [
* { identifier: '0', field: 'author', label: 'Author' },
* { identifier: '1', field: 'title', label: 'Title', width: { min: '150px', max: '500px' } },
* { identifier: '2', field: 'pages', label: 'Pages', hAlign: TableColumnHAlign.Right },
* ];
*
* protected readonly data: ITableRow[] = [
* {
* identifier: "0e1ea95b-5e9b-4638-be2d-419c1455ea2e",
* author: "Herman Melville",
* title: "Moby-Dick; or, The Whale",
* pages: "450",
* },
* // ...
* ]
* ```
*
* ```html
*
*
* ```
*
* ### Custom cell renderer
*
* Out of the box, the Table renders string values. Custom renderer component allow you to implement more complex
* layout, interaction: From a simple icon indicating state to a button or a complex chart – all these use-cases
* involve a custom cell-renderer component.
*
* Your custom component will be rendered in the table cell and be provided with context (table data). This requires
* to implement the `ITableCellRenderer` interface as in the example below.
*
* ```typescript
* // Custom cell renderer component
* import { ITableCellContext, ITableCellRenderer } from '@talenra/ngx-base/table';
*
* export class MyRendererComponent implements ITableCellRenderer {
* private destroyRef: DestroyRef = inject(DestroyRef);
* // Reference to the app/component. Used for binding in both directions.
* private contextRef: MyHostComponent | undefined;
* // The table cell's value (s. `onContext` method)
* protected rating: number = 0;
*
* // Invoked by Table component to provide the cell renderer with context.
* // Example of how to implement App → Renderer data flow.
* onContext({ contextRef, value }: ITableCellContext): void {
* this.contextRef = contextRef as MyHostComponent;
* this.rating = value as number;
* // App → Renderer data flow
* this.contextRef?.myProperty$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value: string) => {
* // Do something with `value`
* });
* }
*
* // Example of how to implement Renderer → App data flow
* private myHandler(): void {
* if (!this.contextRef) return;
* // Renderer → App data flow
* this.contextRef.myHandlerMethod(this.rating);
* }
* }
* ```
*
* The renderer component is then assigned to a column as in the example below.
*
* ```typescript
* import { MyRendererComponent } from './my-renderer.component'
*
* protected readonly columns: TableColumn[] = [
* ...
* { identifier: '3': field: 'rating', label: 'Rating', renderer: MyRendererComponent,
* ];
* ```
*
* ### Two-way binding
*
* An event is emitted when columns is updated. Listen to the event to persist the column configuration (e.g. store
* column widths when resized by the user).
*
* ```html
*
*
* ```
*
* ```typescript
* // Component class
* protected columnsChange(columns: ITableColumn[]): void {
* console.log('Columns updated', columns);
* }
* ```
*
* @see {@link ITableColumn}
* @see {@link ITableCellContext}
*/
columns: _angular_core.ModelSignal;
/**
* Table data, represented by an array of table rows.
*
* The provided data's fields are matched to the Table's columns based on the `ITableColumn`'s `field` property.
*
* ```typescript
* // Component class
* import { ITableColumn, ITableRow } from '@talenra/ngx-base/table';
*
* protected readonly columns: ITableColumn[] = [
* { identifier: '0', field: 'author', label: 'Author' },
* { identifier: '1', field: 'title', label: 'Title' },
* { identifier: '2', field: 'isbn', label: 'ISBN' },
* ];
*
* protected readonly data: ITableRow[] = [
* {
* identifier: "0e1ea95b-5e9b-4638-be2d-419c1455ea2e",
* author: "Herman Melville",
* title: "Moby-Dick; or, The Whale",
* isbn: "978-1-530-69790-8",
* },
* // ...
* ]
* ```
*
* ```html
*
*
* ```
*
* @see {@link ITableRow}
*/
data: _angular_core.ModelSignal;
/**
* Optional custom translations to override defaults used in the UI.
*
* ```html
*
* ```
*
* @see {@link ITableTranslations}
*/
translations: _angular_core.InputSignal;
/**
* Reference to your app's context. This is typically the component hosting the Table component.
*
* Context reference is used for data flow between cell renderer components and your app. You can safely omit it if
* you're not using a custom cell-renderer.
*
* ```typescript
* // Component class
* protected contextRef = this;
* ```
*
* ```html
*
*
* ```
*
* @see {@link ITableCellContext}
*/
contextRef: _angular_core.InputSignal;
/**
* Determines whether the optimized responsive layout is used on small viewports.
*
* ```html
*
* ```
*/
useResponsiveMode: _angular_core.InputSignalWithTransform;
/**
* Determines whether the table is currently rendered in responsive mode. Requires `useResponsiveMode` to be `true`
* _and_ a viewport small enough to match the media query condition.
*
* @internal
*/
isResponsive: boolean;
/**
* Determines whether the table is loading data. If set to `true`, a skeleton is displayed.
*
* ```html
*
* ```
*/
isLoading: _angular_core.InputSignalWithTransform;
/**
* The current sort state. Input a value to pre-set sort and/or use two-way binding to update the sort state
* programmatically.
*
* Note that the Table component _does not sort data_. It is up to the consuming app to update data based on the sort
* state. Here's an implementation example.
*
* ```typescript
* // Component class
* import { ITableSortState, TableSortDirection } from '@talenra/ngx-base/table';
*
* protected sortState: ITableSortState | null = { field: 'author', direction: TableSortDirection.Ascending }
* ```
*
* ```html
*
*
* ```
*
* `sortStateChange` event is emitted when sortState is changed by the user. Contains the current sortState or `null`
* if the table is not sorted.
*
* ```typescript
* // Component class
* protected sortStateChange(sortState: ITableSortState | null): void {
* // Update data based on sortState
* }
* ```
*
* ```html
*
*
* ```
*/
sortState: _angular_core.ModelSignal;
/**
* Event emitted when a row is un-/selected. Contains the relevant row and its selection state.
*
* ```typescript
* // Component class
* protected rowSelectionChange(event: ITableRowSelectionChange): void {
* console.log(`${event.row.identifier} was ${event.isSelected ? 'selected' : 'unselected'}`);
* }
* ```
*
* ```html
*
*
* ```
*/
rowSelectionChange: OutputEmitterRef;
/**
* Determines whether rows are selectable or not. Supports single-row or multi-row selection.
*
* ```html
*
* ```
*
* @see {@link TableSelectionMode}
*/
selectionMode: _angular_core.InputSignal;
/**
* Determines whether row double click event is emitted. If double click support is turned on, single click (used
* for row selection) is slightly delayed.
*
* ```html
*
* ```
*/
emitRowDoubleClick: _angular_core.InputSignalWithTransform;
/**
* Event emitted if a row is double clicked. Contains the relevant row and the mouse event. Requires
* `emitRowDoubleClick` to be set to `true`.
*
* ```html
*
* ```
*
* @see {@link ITableRowDoubleClick}
*/
rowDoubleClick: OutputEmitterRef;
/**
* Array to remember alignment for each colum. Algnment data is read from input property `columns` and applied to all
* `th` and `td` elements.
*/
protected columnAlignment: _angular_core.Signal;
/** Min-/max-width presets */
protected columnWidth: _angular_core.Signal<{
minWidth?: string;
maxWidth?: string;
}[]>;
/**
* Determines whether the table header is displayed. It is displayed only if at least one of the columns has a label.
*/
protected hasHeader: _angular_core.Signal;
/** Instance of the scroll indicator controller. Used to show/hide scroll indicators. */
protected scrollIndicator: TableScrollIndicator;
/** Reference to the scroll container. Provides a reference to the scroll element. */
private scrollContainer;
/** Reference to the table head element. */
private headElmRef;
/** Reference to the table body element. */
private bodyElmRef;
/** Keyboard navigation */
protected navigation: TableNavigation;
/** Track whether the component or any of its children has focus. */
private hasFocus;
/** Row selection */
protected selection: TableSelection;
/** Column resize */
protected resize: TableResize;
/** Number of skeleton rows displayed in loading mode */
protected skeletonRows: unknown[];
protected readonly String: StringConstructor;
private destroyRef;
private changeDetector;
private locale;
private breakpointObserver;
/** @internal */
constructor();
/** @internal */
ngAfterViewInit(): void;
/**
* Handler for un-/selecting rows. Used by navigation, thus exposed via API but not officially documented.
*
* @internal
*/
toggleRowSelection(row: ITableRow): void;
/**
* Handler for pointer-triggered row selection actions. Determines behaviour based on pressed modifier key(s)
* (e.g. meta key).
*/
protected onToggleClick(row: ITableRow, event: MouseEvent, options?: {
cumulate: boolean;
}): void;
/**
* Stores whether a relevant modifier key is pressed (e.g. shift). Used to suppress browser's text selection which
* leads to unwanted behavior as the shift key is used for selection.
*/
private preventTextSelection;
/** Listener for relevant modifier keys. */
private updateTextSelection;
/** Emit double click event */
protected onRowDoubleClick(row: ITableRow, event: MouseEvent): void;
/**
* Handler for sorting. Used by template and navigation. Thus exposed via API but not officially documented.
*
* @internal
*/
sortBy(field: string): void;
/** Returns whether the given column is highlighted. Columns are highlighted if currently used for sorting. */
protected highlightColumn(column: ITableColumn): boolean;
/** Keep track of host element's focus */
private trackFocus;
private handleKeydown;
/** Delegate copy-to-clipboard requests to keyboard navigation controller. */
private copyToClipboard;
/** Checks whether the table is currently rendered in responsive mode and updates `isResponsive` accordingly. */
private updateResponsive;
/** Returns a translated string or – if available – an override. */
protected translate(key: string): string;
/** Returns the number of columns of the table. Adds an extra column if in multi-row-selection mode (checkboxes). */
protected get columnCount(): number;
static ɵfac: _angular_core.ɵɵFactoryDeclaration;
static ɵcmp: _angular_core.ɵɵComponentDeclaration;
}
/**
* TableToolbar is a wrapper component for SearchField and Paginator components while both are optional. It is used in
* context of a Table component and takes care of the layout. SearchField and Paginator are provided by the consuming
* app which is also responsible to handle the respective events and to implement the required logic.
*
* ```html
*
*
*
*
*
*
* ```
*
* ### Import
*
* ```typescript
* import { TableToolbarComponent } from '@talenra/ngx-base/table';
* ```
*
* ../../#/table
*/
declare class TableToolbarComponent implements AfterContentInit {
private searchInput?;
private paginator?;
/** @internal */
ngAfterContentInit(): void;
static ɵfac: _angular_core.ɵɵFactoryDeclaration;
static ɵcmp: _angular_core.ɵɵComponentDeclaration;
}
/**
* Object passed to custom table cell renderer component providing table context.
*
* ### Import
*
* ```typescript
* import { ITableCellContext } from '@talenra/ngx-base/table';
* ```
*
* @see {@link TableComponent#columns}
* @see {@link ITableCellRenderer}
*/
interface ITableCellContext {
/**
* Reference to Table's `contextRef` property. Context reference is used to "link" cell renderer to your app's
* context.
*/
contextRef: unknown;
/** Column the cell belongs to */
column: ITableColumn;
/** Row the cell belongs to */
row: ITableRow;
/** Cell's value */
value: unknown;
}
/**
* Interface to be implemented by custom table cell renderer components.
*
* ### Import
*
* ```typescript
* import { ITableCellRenderer } from '@talenra/ngx-base/table';
* ```
*
* @see {@link TableComponent#columns}
* @see {@link ITableColumn}
*/
interface ITableCellRenderer {
/** Invoked by the enclosing Table component with context data in the parameter. */
onContext: (params: ITableCellContext) => void;
}
export { TableColumnHAlign, TableComponent, TableSelectionMode, TableSortDirection, TableToolbarComponent };
export type { ITableCellContext, ITableCellRenderer, ITableColumn, ITableRow, ITableRowDoubleClick, ITableRowSelectionChange, ITableSortState, ITableTranslations, TTableColumnHAlign, TTableColumnWidth, TTableSelectionMode, TTableSortDirection };