@acorex/components 21.0.2-next.57 → 21.0.2-next.59
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/data-table/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i2 from '@acorex/cdk/common';
|
|
2
|
-
import { MXBaseComponent, AXDataSource, AXStyleColorType, AXEvent,
|
|
2
|
+
import { AXSortOrder, MXBaseComponent, AXDataSource, AXStyleColorType, AXEvent, AXButtonClickEvent, AXStyleLookType, AXClickEvent, AXItemClickEvent, AXValueChangedEvent, AXListDataSource } from '@acorex/cdk/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { TemplateRef, EventEmitter, WritableSignal, ChangeDetectorRef, OnInit, DoCheck, QueryList, ElementRef, AfterViewInit, Signal } from '@angular/core';
|
|
5
5
|
import * as i11 from '@acorex/core/format';
|
|
@@ -19,6 +19,38 @@ import { AXDataPagerComponent, AXDataPagerChangedEvent } from '@acorex/component
|
|
|
19
19
|
import * as i13 from '@angular/cdk/drag-drop';
|
|
20
20
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
21
21
|
|
|
22
|
+
declare abstract class AXDataTableColumnComponent {
|
|
23
|
+
caption: string;
|
|
24
|
+
/**
|
|
25
|
+
* Width of the column.
|
|
26
|
+
* - string: e.g., '180px', '20%'
|
|
27
|
+
* - number: e.g., 180 (treated as pixels)
|
|
28
|
+
* - 'auto': sizes from headers when the table first renders, then refits from row content once data loads
|
|
29
|
+
*
|
|
30
|
+
* @defaultValue 'auto'
|
|
31
|
+
*/
|
|
32
|
+
width: string | number | 'auto';
|
|
33
|
+
fixed: 'start' | 'end' | undefined;
|
|
34
|
+
allowSorting: boolean;
|
|
35
|
+
allowResizing: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* When true, shows the cell content as tooltip on hover (via `axTooltip`).
|
|
38
|
+
*/
|
|
39
|
+
hasTitle: boolean;
|
|
40
|
+
sortIndex: number | undefined;
|
|
41
|
+
sortOrder: AXSortOrder | undefined;
|
|
42
|
+
abstract get renderCellTemplate(): TemplateRef<unknown>;
|
|
43
|
+
abstract get renderHeaderTemplate(): TemplateRef<unknown>;
|
|
44
|
+
abstract get renderFooterTemplate(): TemplateRef<unknown>;
|
|
45
|
+
abstract get loadingEnabled(): boolean;
|
|
46
|
+
abstract get name(): string;
|
|
47
|
+
get cssClass(): string | undefined;
|
|
48
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXDataTableColumnComponent, never>;
|
|
49
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXDataTableColumnComponent>;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
type AXDataTableCssClassValue = string | null | undefined;
|
|
53
|
+
|
|
22
54
|
interface AXDataTableScrollIndexChanged extends AXEvent {
|
|
23
55
|
index: number;
|
|
24
56
|
}
|
|
@@ -40,6 +72,11 @@ type AXDataTableLook = 'classic' | 'minimal';
|
|
|
40
72
|
*/
|
|
41
73
|
type AXDataTableRowColorType = Exclude<AXStyleColorType, 'default'>;
|
|
42
74
|
declare const AX_DATA_TABLE_ROW_COLOR_TYPES: AXDataTableRowColorType[];
|
|
75
|
+
|
|
76
|
+
/** Row CSS class resolver; may return a value synchronously or as a `Promise`. */
|
|
77
|
+
type AXDataTableRowCssClassResolver = (row: unknown, rowIndex: number) => AXDataTableCssClassValue | Promise<AXDataTableCssClassValue>;
|
|
78
|
+
/** Cell CSS class resolver; may return a value synchronously or as a `Promise`. */
|
|
79
|
+
type AXDataTableCellCssClassResolver = (row: unknown, column: AXDataTableColumnComponent, rowIndex: number) => AXDataTableCssClassValue | Promise<AXDataTableCssClassValue>;
|
|
43
80
|
/**
|
|
44
81
|
* Options for temporarily highlighting a row (e.g. after create).
|
|
45
82
|
*/
|
|
@@ -85,18 +122,32 @@ declare abstract class AXBaseDataTable extends MXBaseComponent {
|
|
|
85
122
|
*/
|
|
86
123
|
rowDetailsTemplate?: TemplateRef<unknown>;
|
|
87
124
|
/**
|
|
88
|
-
* Resolves
|
|
89
|
-
*
|
|
125
|
+
* Resolves custom CSS classes for a row `<tr>`.
|
|
126
|
+
* Supports synchronous and asynchronous (`Promise`) return values.
|
|
90
127
|
*/
|
|
91
|
-
|
|
128
|
+
rowCssClass?: AXDataTableRowCssClassResolver;
|
|
92
129
|
/**
|
|
93
|
-
*
|
|
94
|
-
*
|
|
130
|
+
* Resolves custom CSS classes for an individual body cell `<td>`.
|
|
131
|
+
* Column `cssClass` is preserved and merged with the resolved value.
|
|
132
|
+
* Supports synchronous and asynchronous (`Promise`) return values.
|
|
95
133
|
*/
|
|
96
|
-
|
|
134
|
+
cellCssClass?: AXDataTableCellCssClassResolver;
|
|
135
|
+
/**
|
|
136
|
+
* When set, matching text in the table body is highlighted.
|
|
137
|
+
*/
|
|
138
|
+
get highlightText(): string | undefined;
|
|
139
|
+
set highlightText(value: string | undefined);
|
|
97
140
|
selectedRowsChange: EventEmitter<unknown[]>;
|
|
98
141
|
protected readonly highlightedRows: WritableSignal<Map<string | number, AXDataTableRowHighlight>>;
|
|
142
|
+
private readonly rowCssClassCache;
|
|
143
|
+
private readonly cellCssClassCache;
|
|
144
|
+
private readonly highlightService;
|
|
145
|
+
private readonly platformId;
|
|
146
|
+
private readonly destroyRef;
|
|
147
|
+
private _highlightText?;
|
|
99
148
|
private highlightOrder;
|
|
149
|
+
private textHighlightFrame?;
|
|
150
|
+
constructor();
|
|
100
151
|
/**
|
|
101
152
|
* Gets the data source key field name.
|
|
102
153
|
*
|
|
@@ -125,19 +176,39 @@ declare abstract class AXBaseDataTable extends MXBaseComponent {
|
|
|
125
176
|
*/
|
|
126
177
|
getRowHighlightBadge(row: unknown): string | null;
|
|
127
178
|
/**
|
|
128
|
-
*
|
|
179
|
+
* Clears cached asynchronous CSS class results for rows and cells.
|
|
129
180
|
*/
|
|
130
|
-
|
|
181
|
+
clearResolvedCssClasses(): void;
|
|
131
182
|
/**
|
|
132
|
-
* Returns
|
|
183
|
+
* Returns CSS classes for the given row `<tr>`, including temporary highlight styles.
|
|
133
184
|
*/
|
|
134
|
-
|
|
185
|
+
getRowCssClass(row: unknown, rowIndex: number): string;
|
|
186
|
+
/**
|
|
187
|
+
* Returns CSS classes for a body cell, merging column `cssClass` with `cellCssClass`.
|
|
188
|
+
*/
|
|
189
|
+
getCellCssClass(row: unknown, column: AXDataTableColumnComponent, rowIndex: number): string;
|
|
135
190
|
/**
|
|
136
191
|
* Merges pinned highlighted rows with loaded items.
|
|
137
192
|
*/
|
|
138
193
|
protected mergeRowsWithHighlights(items: unknown[]): unknown[];
|
|
139
194
|
protected resolveRowKey(row: unknown): string | number | null;
|
|
140
195
|
protected abstract onRowHighlightsChanged(): void;
|
|
196
|
+
protected onCssClassResolved(): void;
|
|
197
|
+
/**
|
|
198
|
+
* Schedules text highlighting after the current render frame.
|
|
199
|
+
*/
|
|
200
|
+
protected scheduleTextHighlight(): void;
|
|
201
|
+
/**
|
|
202
|
+
* Returns the DOM root used for text highlighting.
|
|
203
|
+
*/
|
|
204
|
+
protected getTextHighlightRoot(): HTMLElement | null;
|
|
205
|
+
protected getTextHighlightSelector(): string;
|
|
206
|
+
protected applyTextHighlight(): void;
|
|
207
|
+
protected clearTextHighlight(): void;
|
|
208
|
+
private resolveRowCssClass;
|
|
209
|
+
private resolveCellCssClass;
|
|
210
|
+
private resolveRowCssClassCacheKey;
|
|
211
|
+
private resolveCellCssClassCacheKey;
|
|
141
212
|
private _selectedRows;
|
|
142
213
|
get selectedRows(): unknown[];
|
|
143
214
|
set selectedRows(v: unknown[]);
|
|
@@ -173,36 +244,6 @@ declare abstract class AXBaseDataTable extends MXBaseComponent {
|
|
|
173
244
|
static ɵprov: i0.ɵɵInjectableDeclaration<AXBaseDataTable>;
|
|
174
245
|
}
|
|
175
246
|
|
|
176
|
-
declare abstract class AXDataTableColumnComponent {
|
|
177
|
-
caption: string;
|
|
178
|
-
/**
|
|
179
|
-
* Width of the column.
|
|
180
|
-
* - string: e.g., '180px', '20%'
|
|
181
|
-
* - number: e.g., 180 (treated as pixels)
|
|
182
|
-
* - 'auto': sizes from headers when the table first renders, then refits from row content once data loads
|
|
183
|
-
*
|
|
184
|
-
* @defaultValue 'auto'
|
|
185
|
-
*/
|
|
186
|
-
width: string | number | 'auto';
|
|
187
|
-
fixed: 'start' | 'end' | undefined;
|
|
188
|
-
allowSorting: boolean;
|
|
189
|
-
allowResizing: boolean;
|
|
190
|
-
/**
|
|
191
|
-
* When true, shows the cell content as tooltip on hover (via `axTooltip`).
|
|
192
|
-
*/
|
|
193
|
-
hasTitle: boolean;
|
|
194
|
-
sortIndex: number | undefined;
|
|
195
|
-
sortOrder: AXSortOrder | undefined;
|
|
196
|
-
abstract get renderCellTemplate(): TemplateRef<unknown>;
|
|
197
|
-
abstract get renderHeaderTemplate(): TemplateRef<unknown>;
|
|
198
|
-
abstract get renderFooterTemplate(): TemplateRef<unknown>;
|
|
199
|
-
abstract get loadingEnabled(): boolean;
|
|
200
|
-
abstract get name(): string;
|
|
201
|
-
get cssClass(): string | undefined;
|
|
202
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXDataTableColumnComponent, never>;
|
|
203
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXDataTableColumnComponent>;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
247
|
declare class AXDataTableColumnResizableDirective {
|
|
207
248
|
private el;
|
|
208
249
|
private renderer;
|
|
@@ -917,6 +958,7 @@ declare class AXInfiniteScrollDataTableComponent extends AXBaseDataTable impleme
|
|
|
917
958
|
* @ignore
|
|
918
959
|
*/
|
|
919
960
|
protected onRowHighlightsChanged(): void;
|
|
961
|
+
protected onCssClassResolved(): void;
|
|
920
962
|
/**
|
|
921
963
|
* @ignore
|
|
922
964
|
*/
|
|
@@ -946,7 +988,7 @@ declare class AXInfiniteScrollDataTableComponent extends AXBaseDataTable impleme
|
|
|
946
988
|
*/
|
|
947
989
|
protected _handleOnScroll(): void;
|
|
948
990
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXInfiniteScrollDataTableComponent, never>;
|
|
949
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AXInfiniteScrollDataTableComponent, "ax-infinite-scroll-data-table", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "
|
|
991
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXInfiniteScrollDataTableComponent, "ax-infinite-scroll-data-table", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "rowCssClass": { "alias": "rowCssClass"; "required": false; }; "cellCssClass": { "alias": "cellCssClass"; "required": false; }; "highlightText": { "alias": "highlightText"; "required": false; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; "rowTemplate": { "alias": "rowTemplate"; "required": false; }; "emptyTemplate": { "alias": "emptyTemplate"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "fetchDataMode": { "alias": "fetchDataMode"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "focusedRow": { "alias": "focusedRow"; "required": false; }; "itemHeight": { "alias": "itemHeight"; "required": false; }; }, { "selectedRowsChange": "selectedRowsChange"; "onPageChanged": "onPageChanged"; "onRowClick": "onRowClick"; "onRowDbClick": "onRowDbClick"; "focusedRowChange": "focusedRowChange"; "onScrolledIndexChanged": "onScrolledIndexChanged"; }, ["columns"], ["ax-header", "ax-footer"], true, never>;
|
|
950
992
|
}
|
|
951
993
|
|
|
952
994
|
/**
|
|
@@ -1275,6 +1317,7 @@ declare class AXDataTableComponent extends AXBaseDataTable implements OnInit, Af
|
|
|
1275
1317
|
* @ignore
|
|
1276
1318
|
*/
|
|
1277
1319
|
protected onRowHighlightsChanged(): void;
|
|
1320
|
+
protected onCssClassResolved(): void;
|
|
1278
1321
|
/**
|
|
1279
1322
|
* Refreshes the data table with optional reset options.
|
|
1280
1323
|
*
|
|
@@ -1356,7 +1399,7 @@ declare class AXDataTableComponent extends AXBaseDataTable implements OnInit, Af
|
|
|
1356
1399
|
headerOnly?: boolean;
|
|
1357
1400
|
}): void;
|
|
1358
1401
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXDataTableComponent, never>;
|
|
1359
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AXDataTableComponent, "ax-data-table", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "selectedRows": { "alias": "selectedRows"; "required": false; }; "parentField": { "alias": "parentField"; "required": false; }; "hasChildrenField": { "alias": "hasChildrenField"; "required": false; }; "rowDetailsTemplate": { "alias": "rowDetailsTemplate"; "required": false; }; "
|
|
1402
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXDataTableComponent, "ax-data-table", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "selectedRows": { "alias": "selectedRows"; "required": false; }; "parentField": { "alias": "parentField"; "required": false; }; "hasChildrenField": { "alias": "hasChildrenField"; "required": false; }; "rowDetailsTemplate": { "alias": "rowDetailsTemplate"; "required": false; }; "rowCssClass": { "alias": "rowCssClass"; "required": false; }; "cellCssClass": { "alias": "cellCssClass"; "required": false; }; "highlightText": { "alias": "highlightText"; "required": false; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; "rowTemplate": { "alias": "rowTemplate"; "required": false; }; "emptyTemplate": { "alias": "emptyTemplate"; "required": false; }; "noDataTemplate": { "alias": "noDataTemplate"; "required": false; }; "alternative": { "alias": "alternative"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "fixedHeader": { "alias": "fixedHeader"; "required": false; }; "showFooter": { "alias": "showFooter"; "required": false; }; "fixedFooter": { "alias": "fixedFooter"; "required": false; }; "itemHeight": { "alias": "itemHeight"; "required": false; }; "allowReordering": { "alias": "allowReordering"; "required": false; }; "paging": { "alias": "paging"; "required": false; }; "fetchDataMode": { "alias": "fetchDataMode"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "focusedRow": { "alias": "focusedRow"; "required": false; }; }, { "selectedRowsChange": "selectedRowsChange"; "focusedRowChange": "focusedRowChange"; "onRowClick": "onRowClick"; "onRowDbClick": "onRowDbClick"; "onColumnsOrderChanged": "onColumnsOrderChanged"; "onColumnSizeChanged": "onColumnSizeChanged"; "onPageChanged": "onPageChanged"; }, ["customDataPager", "columns"], ["ax-header", "ax-data-pager", "ax-footer"], true, never>;
|
|
1360
1403
|
}
|
|
1361
1404
|
|
|
1362
1405
|
declare class AXDataTableModule {
|
|
@@ -1366,4 +1409,4 @@ declare class AXDataTableModule {
|
|
|
1366
1409
|
}
|
|
1367
1410
|
|
|
1368
1411
|
export { AXBaseDataTable, AXBaseRowCommandColumnComponent, AXDataTableColumnComponent, AXDataTableColumnResizableDirective, AXDataTableComponent, AXDataTableModule, AXDataTableTextColumnComponent, AXInfiniteScrollDataTableComponent, AXRowCommandColumnComponent, AXRowDropdownCommandColumnComponent, AXRowExpandColumnComponent, AXRowIndexColumnComponent, AXRowSelectColumnComponent, AX_DATA_TABLE_ROW_COLOR_TYPES, AX_DATA_TABLE_ROW_HIGHLIGHT_DEFAULT_BADGE };
|
|
1369
|
-
export type { AXColumnsOrderChangedEvent, AXDataTableLook, AXDataTableRowClick, AXDataTableRowColorType, AXDataTableRowDbClick, AXDataTableRowHighlight, AXDataTableRowHighlightOptions, AXDataTableScrollIndexChanged, AXRowCommandItem, AXRowCommandItemClickEvent, onColumnSizeChangedEvent };
|
|
1412
|
+
export type { AXColumnsOrderChangedEvent, AXDataTableCellCssClassResolver, AXDataTableCssClassValue, AXDataTableLook, AXDataTableRowClick, AXDataTableRowColorType, AXDataTableRowCssClassResolver, AXDataTableRowDbClick, AXDataTableRowHighlight, AXDataTableRowHighlightOptions, AXDataTableScrollIndexChanged, AXRowCommandItem, AXRowCommandItemClickEvent, onColumnSizeChangedEvent };
|