@life-cockpit/angular-ui-kit 1.11.3 → 1.11.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -3772,6 +3772,8 @@ interface TableColumn {
|
|
|
3772
3772
|
cssClass?: string;
|
|
3773
3773
|
/** Optional tooltip shown on hover over the column header */
|
|
3774
3774
|
tooltip?: string;
|
|
3775
|
+
/** Optional formatter for cell output when no custom template is used */
|
|
3776
|
+
formatter?: (value: unknown, row: Record<string, unknown>, column: TableColumn, rowIndex: number) => unknown;
|
|
3775
3777
|
/** Input type for inline editing (default: text) */
|
|
3776
3778
|
editType?: 'text' | 'number' | 'select';
|
|
3777
3779
|
/** Options for select edit type */
|
|
@@ -3802,7 +3804,9 @@ type TableSize = 'sm' | 'md' | 'lg';
|
|
|
3802
3804
|
* - Variant styles (default, striped, bordered)
|
|
3803
3805
|
* - Size presets (sm, md, lg)
|
|
3804
3806
|
* - Hoverable row highlighting
|
|
3807
|
+
* - Per-column formatter callbacks for display values
|
|
3805
3808
|
* - Custom cell templates via content projection
|
|
3809
|
+
* - Composed cells (e.g. avatar + badge + actions)
|
|
3806
3810
|
* - Responsive horizontal scrolling
|
|
3807
3811
|
* - Empty state text for no data
|
|
3808
3812
|
* - Accessible with proper table semantics
|
|
@@ -3812,6 +3816,20 @@ type TableSize = 'sm' | 'md' | 'lg';
|
|
|
3812
3816
|
* <lc-table [columns]="columns" [data]="data" variant="striped" [hoverable]="true"
|
|
3813
3817
|
* (sort)="onSort($event)" (rowClick)="onRowClick($event)" />
|
|
3814
3818
|
* ```
|
|
3819
|
+
*
|
|
3820
|
+
* @example
|
|
3821
|
+
* ```ts
|
|
3822
|
+
* columns: TableColumn[] = [
|
|
3823
|
+
* {
|
|
3824
|
+
* key: 'amount',
|
|
3825
|
+
* label: 'Amount',
|
|
3826
|
+
* formatter: (value) => new Intl.NumberFormat('de-DE', {
|
|
3827
|
+
* style: 'currency',
|
|
3828
|
+
* currency: 'EUR',
|
|
3829
|
+
* }).format(Number(value ?? 0)),
|
|
3830
|
+
* },
|
|
3831
|
+
* ];
|
|
3832
|
+
* ```
|
|
3815
3833
|
*/
|
|
3816
3834
|
declare class TableComponent {
|
|
3817
3835
|
/** Custom cell templates */
|
|
@@ -3894,6 +3912,7 @@ declare class TableComponent {
|
|
|
3894
3912
|
getAriaSort(columnKey: string): string | null;
|
|
3895
3913
|
getHeaderClasses(column: TableColumn): string;
|
|
3896
3914
|
getCellValue(row: Record<string, unknown>, columnKey: string): unknown;
|
|
3915
|
+
getFormattedCellValue(row: Record<string, unknown>, column: TableColumn, relativeRowIndex: number): unknown;
|
|
3897
3916
|
getCellTemplate(columnKey: string): TableCellDirective | undefined;
|
|
3898
3917
|
hasCustomTemplate(columnKey: string): boolean;
|
|
3899
3918
|
onRowClick(row: Record<string, unknown>): void;
|