@asadi/angular-date-components
Version:
`Angular Date Components` is a comprehensive angular library of date-related components designed to meet the needs of applications that require localization based on various calendar systems. While the package currently includes two powerful components (S
79 lines (78 loc) • 3.04 kB
TypeScript
import { AfterViewInit, EventEmitter, OnInit, Renderer2 } from '@angular/core';
import { ADCITableRow, ADCIOptions } from '../../interface';
import { TableSelection } from '../../table-selection';
import { FlatEventBuilder } from '../../flat-event-builder';
import * as i0 from "@angular/core";
/**
* A reusable and customizable table component for displaying date-related data.
* The `adc-table` component is designed for use within the Angular Date Components package.
* It supports features like row and column labels, custom cell event builders, and date range selection.
*
* The component allows for displaying a dynamic table with custom rows, columns, and cells.
* It supports both left-to-right (`ltr`) and right-to-left (`rtl`) layouts.
*
* ### Features
* - Dynamically updates the table view when cell data changes.
* - Supports date filtering and custom event builders for handling cell events.
* - Emits an event when a date range is selected.
*
* @example
* ```html
* <adc-table
* [Rows]="tableRows"
* [Columns]="tableColumns"
* [Cells]="tableCells"
* [Title]="'My Schedule'"
* [TitleClass]="'table-title'"
* [ShowRowLabels]="true"
* [ShowColumnLabels]="false"
* [Dir]="'ltr'"
* [DateFilter]="customDateFilter"
* [EventBuilder]="eventBuilderInstance"
* (DateRangeSelect)="onDateRangeSelect($event)">
* </adc-table>
* ```
*
* @example
* ```typescript
* // In your component class
* tableRows: ADCITableRow[] = [...];
* tableColumns: ADCITableColumn[] = [...];
* tableCells: ADCITableCell[] = [...];
*
* onDateRangeSelect(selectedCells: ADCITableCell[]) {
* console.log('Selected cells:', selectedCells);
* }
* ```
*/
export declare class ADCTableComponent implements AfterViewInit, OnInit {
readonly options: ADCIOptions;
readonly renderer: Renderer2;
/**
* An array of rows to display in the table.
*/
tableRows: ADCITableRow[];
/**
* a boolean which determines if row details should be displayed or not
*/
showRow: boolean;
/**
*
* The title displayed above the table.
*/
title: string;
/**
* CSS classes to apply to the title.
*/
titleClassList: string;
eventBuilder: FlatEventBuilder;
selectionManager: TableSelection;
private viewCtrl;
viewReadyEvent: EventEmitter<void>;
maxHeight: string | null;
ngOnInit(): void;
ngAfterViewInit(): void;
onViewReady(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ADCTableComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ADCTableComponent, "adc-table", never, { "tableRows": { "alias": "rows"; "required": false; }; "showRow": { "alias": "showRowDetails"; "required": false; }; "title": { "alias": "title"; "required": false; }; "titleClassList": { "alias": "titleClass"; "required": false; }; "eventBuilder": { "alias": "eventBuilder"; "required": false; }; "selectionManager": { "alias": "selectionManager"; "required": false; }; }, { "viewReadyEvent": "viewReady"; }, never, never, true, never>;
}