@fuentis/phoenix-ui 0.0.9-alpha.372 → 0.0.9-alpha.374
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.
|
@@ -5,45 +5,105 @@ import { tableColumnType, tableSelectionType } from '../utils/dataTable.enum';
|
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class TableComponent implements OnChanges {
|
|
7
7
|
dt: Table;
|
|
8
|
+
/** Input data for the table. Automatically updates original and derived states. */
|
|
8
9
|
set data(value: any[]);
|
|
10
|
+
/** Column definitions provided by the parent. */
|
|
9
11
|
columns: any[];
|
|
12
|
+
/** Preselected columns (used to restore user preferences). */
|
|
10
13
|
selectedColumnsInput: any[];
|
|
14
|
+
/** Table configuration (key, toggles, options). */
|
|
11
15
|
tableConfiguration: any;
|
|
16
|
+
/** Dynamic filters passed from parent. */
|
|
12
17
|
filters: any;
|
|
18
|
+
/** Emits when a row-level or global action is triggered. */
|
|
13
19
|
actionClick: EventEmitter<any>;
|
|
20
|
+
/** Emits when a row is clicked or selected. */
|
|
14
21
|
rowSelection: EventEmitter<any>;
|
|
22
|
+
/** Emits when checkbox selection changes. */
|
|
15
23
|
checkBoxSelection: EventEmitter<any>;
|
|
24
|
+
/** Emits when columns are saved or changed. */
|
|
16
25
|
saveColumns: EventEmitter<string[]>;
|
|
26
|
+
/** i18n translation service. */
|
|
17
27
|
translateService: TranslateService;
|
|
28
|
+
/** Change detection reference for delayed updates. */
|
|
18
29
|
private cdr;
|
|
30
|
+
/** Full dataset after filters/search/sorting. */
|
|
19
31
|
allData: any[];
|
|
32
|
+
/** Immutable copy of the original dataset. */
|
|
20
33
|
originalData: any[];
|
|
34
|
+
/** Data currently bound to the UI table. */
|
|
21
35
|
tableData: any[];
|
|
36
|
+
/** Current selection of rows. */
|
|
22
37
|
selectedItems: import("@angular/core").WritableSignal<any[]>;
|
|
38
|
+
/** Columns currently visible in the UI. */
|
|
23
39
|
selectedColumns: any[];
|
|
40
|
+
/** Text from global search input. */
|
|
24
41
|
searchQuery: string;
|
|
42
|
+
/** Indicates if multiple rows are selected. */
|
|
25
43
|
bulkMode: boolean;
|
|
44
|
+
/** Number of records after filtering/search. */
|
|
26
45
|
totalRecords: number;
|
|
46
|
+
/** Index of the last record loaded (for virtual scroll). */
|
|
27
47
|
lastLoadedIndex: number;
|
|
48
|
+
/** Enum references for templates. */
|
|
28
49
|
selectionTypeEnum: typeof tableSelectionType;
|
|
29
50
|
columnTypeEnum: typeof tableColumnType;
|
|
51
|
+
/** Date format string for date columns. */
|
|
30
52
|
dateFormat: string;
|
|
53
|
+
/** Active filter state. */
|
|
31
54
|
private currentFilters;
|
|
55
|
+
/** Column field → type mapping for sorting/formatting. */
|
|
32
56
|
columnTypeMap: Record<string, string>;
|
|
57
|
+
/**
|
|
58
|
+
* Lifecycle hook: triggered when inputs change.
|
|
59
|
+
* Resets selection, maps columns, sets defaults for actions.
|
|
60
|
+
*/
|
|
33
61
|
ngOnChanges(changes: SimpleChanges): void;
|
|
62
|
+
/**
|
|
63
|
+
* Handles lazy loading of data (paging, sorting).
|
|
64
|
+
* Supports multi-column sorting and slicing by index.
|
|
65
|
+
*/
|
|
34
66
|
loadLazyData(event: TableLazyLoadEvent): void;
|
|
67
|
+
/**
|
|
68
|
+
* Converts any value into a form usable for sorting.
|
|
69
|
+
* Handles numbers, strings, dates, ranges, arrays, and objects.
|
|
70
|
+
*/
|
|
35
71
|
private getComparableValue;
|
|
72
|
+
/**
|
|
73
|
+
* Executes global search across all records and fields.
|
|
74
|
+
* Preserves active filters if applied.
|
|
75
|
+
*/
|
|
36
76
|
onSearch(query: string): void;
|
|
77
|
+
/**
|
|
78
|
+
* Re-applies filters on the original dataset.
|
|
79
|
+
* Used internally to recompute data after filter state changes.
|
|
80
|
+
*/
|
|
37
81
|
private getFilteredData;
|
|
82
|
+
/**
|
|
83
|
+
* Applies new filter values to the dataset.
|
|
84
|
+
* Handles primitives, objects, and LIST columns (arrays of values).
|
|
85
|
+
*/
|
|
38
86
|
applyFilters(filters: Record<string, any>): void;
|
|
87
|
+
/** Determines if a row can be selected based on `canSelect`. */
|
|
39
88
|
isRowSelectable(event: any): boolean;
|
|
89
|
+
/** Retrieves a nested value from an object given a dot-path. */
|
|
40
90
|
private getNestedValue;
|
|
91
|
+
/** Updates selected columns and triggers change detection. */
|
|
41
92
|
applyColumns(selected: any[]): void;
|
|
93
|
+
/** Emits row selection events. */
|
|
42
94
|
onRowClick(event: Event, rowData: any): void;
|
|
95
|
+
/** Updates checkbox selection state and emits changes. */
|
|
43
96
|
onSelectionChange(selected: any[]): void;
|
|
97
|
+
/**
|
|
98
|
+
* Handles table action clicks.
|
|
99
|
+
* Supports PDF/CSV exports with localized labels.
|
|
100
|
+
*/
|
|
44
101
|
handleActionClick(event: any): void;
|
|
102
|
+
/** Convenience wrapper for translations in templates. */
|
|
45
103
|
translateKey(key: string): string;
|
|
104
|
+
/** Checks if a value matches the global search query. */
|
|
46
105
|
private matchesQuery;
|
|
106
|
+
/** Clears all selections and disables bulk mode. */
|
|
47
107
|
clearSelection(): void;
|
|
48
108
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, never>;
|
|
49
109
|
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "phoenix-table", never, { "data": { "alias": "data"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "selectedColumnsInput": { "alias": "selectedColumnsInput"; "required": false; }; "tableConfiguration": { "alias": "tableConfiguration"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; }, { "actionClick": "actionClick"; "rowSelection": "rowSelection"; "checkBoxSelection": "checkBoxSelection"; "saveColumns": "saveColumns"; }, never, never, true, never>;
|