@duskmoon-dev/el-pro-data-grid 0.8.1 → 0.8.3
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/dist/cjs/index.js +7584 -0
- package/dist/cjs/index.js.map +56 -0
- package/dist/cjs/register.js +7587 -0
- package/dist/cjs/register.js.map +57 -0
- package/dist/esm/index.js +7542 -0
- package/dist/esm/index.js.map +56 -0
- package/dist/esm/register.js +7504 -0
- package/dist/esm/register.js.map +57 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/core/advanced-filter.d.ts +47 -0
- package/dist/types/core/advanced-filter.d.ts.map +1 -0
- package/dist/types/core/cell-editor.d.ts +67 -0
- package/dist/types/core/cell-editor.d.ts.map +1 -0
- package/dist/types/core/cell-selection.d.ts +94 -0
- package/dist/types/core/cell-selection.d.ts.map +1 -0
- package/dist/types/core/clipboard-service.d.ts +69 -0
- package/dist/types/core/clipboard-service.d.ts.map +1 -0
- package/dist/types/core/column-controller.d.ts +43 -0
- package/dist/types/core/column-controller.d.ts.map +1 -0
- package/dist/types/core/column-menu.d.ts +30 -0
- package/dist/types/core/column-menu.d.ts.map +1 -0
- package/dist/types/core/context-menu.d.ts +57 -0
- package/dist/types/core/context-menu.d.ts.map +1 -0
- package/dist/types/core/data-export.d.ts +73 -0
- package/dist/types/core/data-export.d.ts.map +1 -0
- package/dist/types/core/datasource.d.ts +76 -0
- package/dist/types/core/datasource.d.ts.map +1 -0
- package/dist/types/core/filter-engine.d.ts +18 -0
- package/dist/types/core/filter-engine.d.ts.map +1 -0
- package/dist/types/core/find-bar.d.ts +69 -0
- package/dist/types/core/find-bar.d.ts.map +1 -0
- package/dist/types/core/focus-manager.d.ts +21 -0
- package/dist/types/core/focus-manager.d.ts.map +1 -0
- package/dist/types/core/grid-state.d.ts +65 -0
- package/dist/types/core/grid-state.d.ts.map +1 -0
- package/dist/types/core/infinite-scroll.d.ts +50 -0
- package/dist/types/core/infinite-scroll.d.ts.map +1 -0
- package/dist/types/core/keyboard-nav.d.ts +28 -0
- package/dist/types/core/keyboard-nav.d.ts.map +1 -0
- package/dist/types/core/locale.d.ts +88 -0
- package/dist/types/core/locale.d.ts.map +1 -0
- package/dist/types/core/pagination.d.ts +63 -0
- package/dist/types/core/pagination.d.ts.map +1 -0
- package/dist/types/core/quick-filter.d.ts +22 -0
- package/dist/types/core/quick-filter.d.ts.map +1 -0
- package/dist/types/core/row-drag.d.ts +61 -0
- package/dist/types/core/row-drag.d.ts.map +1 -0
- package/dist/types/core/row-expander.d.ts +71 -0
- package/dist/types/core/row-expander.d.ts.map +1 -0
- package/dist/types/core/row-grouping.d.ts +96 -0
- package/dist/types/core/row-grouping.d.ts.map +1 -0
- package/dist/types/core/row-pinning.d.ts +45 -0
- package/dist/types/core/row-pinning.d.ts.map +1 -0
- package/dist/types/core/row-pivot.d.ts +46 -0
- package/dist/types/core/row-pivot.d.ts.map +1 -0
- package/dist/types/core/row-styling.d.ts +74 -0
- package/dist/types/core/row-styling.d.ts.map +1 -0
- package/dist/types/core/selection-manager.d.ts +64 -0
- package/dist/types/core/selection-manager.d.ts.map +1 -0
- package/dist/types/core/sort-engine.d.ts +24 -0
- package/dist/types/core/sort-engine.d.ts.map +1 -0
- package/dist/types/core/sparkline.d.ts +38 -0
- package/dist/types/core/sparkline.d.ts.map +1 -0
- package/dist/types/core/status-bar.d.ts +49 -0
- package/dist/types/core/status-bar.d.ts.map +1 -0
- package/dist/types/core/transaction.d.ts +50 -0
- package/dist/types/core/transaction.d.ts.map +1 -0
- package/dist/types/core/tree-data.d.ts +78 -0
- package/dist/types/core/tree-data.d.ts.map +1 -0
- package/dist/types/core/undo-redo.d.ts +41 -0
- package/dist/types/core/undo-redo.d.ts.map +1 -0
- package/dist/types/core/virtual-scroller.d.ts +52 -0
- package/dist/types/core/virtual-scroller.d.ts.map +1 -0
- package/dist/types/grid-column-group.d.ts +21 -0
- package/dist/types/grid-column-group.d.ts.map +1 -0
- package/dist/types/grid-column.d.ts +16 -0
- package/dist/types/grid-column.d.ts.map +1 -0
- package/dist/types/index.d.ts +69 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/pro-data-grid.d.ts +324 -0
- package/dist/types/pro-data-grid.d.ts.map +1 -0
- package/dist/types/register.d.ts +2 -0
- package/dist/types/register.d.ts.map +1 -0
- package/dist/types/styles/accessories.css.d.ts +5 -0
- package/dist/types/styles/accessories.css.d.ts.map +1 -0
- package/dist/types/styles/cells.css.d.ts +2 -0
- package/dist/types/styles/cells.css.d.ts.map +1 -0
- package/dist/types/styles/column-menu.css.d.ts +2 -0
- package/dist/types/styles/column-menu.css.d.ts.map +1 -0
- package/dist/types/styles/editor.css.d.ts +2 -0
- package/dist/types/styles/editor.css.d.ts.map +1 -0
- package/dist/types/styles/grid.css.d.ts +2 -0
- package/dist/types/styles/grid.css.d.ts.map +1 -0
- package/dist/types/styles/grouping.css.d.ts +2 -0
- package/dist/types/styles/grouping.css.d.ts.map +1 -0
- package/dist/types/styles/header.css.d.ts +2 -0
- package/dist/types/styles/header.css.d.ts.map +1 -0
- package/dist/types/styles/pagination.css.d.ts +2 -0
- package/dist/types/styles/pagination.css.d.ts.map +1 -0
- package/dist/types/styles/row-features.css.d.ts +5 -0
- package/dist/types/styles/row-features.css.d.ts.map +1 -0
- package/dist/types/styles/selection.css.d.ts +5 -0
- package/dist/types/styles/selection.css.d.ts.map +1 -0
- package/dist/types/styles/tree-expand.css.d.ts +2 -0
- package/dist/types/styles/tree-expand.css.d.ts.map +1 -0
- package/dist/types/types.d.ts +249 -0
- package/dist/types/types.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data export engine — CSV, JSON, and Excel (XLSX) export.
|
|
3
|
+
*
|
|
4
|
+
* CSV follows RFC 4180. JSON exports as array of objects.
|
|
5
|
+
* XLSX is generated as a lightweight SpreadsheetML XML (Office Open XML)
|
|
6
|
+
* without heavy external dependencies.
|
|
7
|
+
*/
|
|
8
|
+
import type { Row, ColumnDef } from '../types.js';
|
|
9
|
+
export interface CsvExportParams {
|
|
10
|
+
filename?: string;
|
|
11
|
+
includeHeaders?: boolean;
|
|
12
|
+
includeGroupHeaders?: boolean;
|
|
13
|
+
selectedOnly?: boolean;
|
|
14
|
+
columns?: string[];
|
|
15
|
+
allColumns?: boolean;
|
|
16
|
+
separator?: string;
|
|
17
|
+
processCellCallback?: (params: ExportCellParams) => string;
|
|
18
|
+
processHeaderCallback?: (params: ExportHeaderParams) => string;
|
|
19
|
+
}
|
|
20
|
+
export interface JsonExportParams {
|
|
21
|
+
filename?: string;
|
|
22
|
+
selectedOnly?: boolean;
|
|
23
|
+
columns?: string[];
|
|
24
|
+
allColumns?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface ExcelExportParams extends CsvExportParams {
|
|
27
|
+
sheetName?: string;
|
|
28
|
+
styles?: boolean;
|
|
29
|
+
author?: string;
|
|
30
|
+
freezeRows?: number;
|
|
31
|
+
freezeColumns?: number;
|
|
32
|
+
autoFilter?: boolean;
|
|
33
|
+
columnWidths?: Record<string, number>;
|
|
34
|
+
}
|
|
35
|
+
export interface ExportCellParams {
|
|
36
|
+
value: unknown;
|
|
37
|
+
row: Row;
|
|
38
|
+
field: string;
|
|
39
|
+
rowIndex: number;
|
|
40
|
+
column: ColumnDef;
|
|
41
|
+
}
|
|
42
|
+
export interface ExportHeaderParams {
|
|
43
|
+
column: ColumnDef;
|
|
44
|
+
}
|
|
45
|
+
export declare class DataExport {
|
|
46
|
+
#private;
|
|
47
|
+
/**
|
|
48
|
+
* Generate a CSV string from row data (RFC 4180 compliant).
|
|
49
|
+
*/
|
|
50
|
+
getDataAsCsv(rows: Row[], columns: ColumnDef[], params?: CsvExportParams): string;
|
|
51
|
+
/**
|
|
52
|
+
* Export CSV as a file download.
|
|
53
|
+
*/
|
|
54
|
+
exportCsv(rows: Row[], columns: ColumnDef[], params?: CsvExportParams): void;
|
|
55
|
+
/**
|
|
56
|
+
* Generate a JSON string from row data.
|
|
57
|
+
*/
|
|
58
|
+
getDataAsJson(rows: Row[], columns: ColumnDef[], params?: JsonExportParams): string;
|
|
59
|
+
/**
|
|
60
|
+
* Export JSON as a file download.
|
|
61
|
+
*/
|
|
62
|
+
exportJson(rows: Row[], columns: ColumnDef[], params?: JsonExportParams): void;
|
|
63
|
+
/**
|
|
64
|
+
* Generate an XLSX file as a Blob using SpreadsheetML XML.
|
|
65
|
+
* This is a lightweight approach without external dependencies.
|
|
66
|
+
*/
|
|
67
|
+
getDataAsExcelXml(rows: Row[], columns: ColumnDef[], params?: ExcelExportParams): string;
|
|
68
|
+
/**
|
|
69
|
+
* Export Excel XML as a file download.
|
|
70
|
+
*/
|
|
71
|
+
exportExcel(rows: Row[], columns: ColumnDef[], params?: ExcelExportParams): void;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=data-export.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-export.d.ts","sourceRoot":"","sources":["../../../src/core/data-export.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIlD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,MAAM,CAAC;IAC3D,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,MAAM,CAAC;CAChE;AAED,MAAM,WAAW,gBAAgB;IAC/B,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IAMlF;;;OAGG;IACH,iBAAiB,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,GAAE,iBAAsB,GAAG,MAAM;IAoF5F;;OAEG;IACH,WAAW,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,GAAE,iBAAsB,GAAG,IAAI;CA8DrF"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Datasource interface and server-side row model for the data grid.
|
|
3
|
+
*
|
|
4
|
+
* Provides a request/response pattern where the grid sends parameters
|
|
5
|
+
* (sort, filter, group keys, pagination) and the consumer returns data.
|
|
6
|
+
*/
|
|
7
|
+
import type { Row, SortItem, FilterModel } from '../types.js';
|
|
8
|
+
export interface IDatasourceGetRowsParams {
|
|
9
|
+
startRow: number;
|
|
10
|
+
endRow: number;
|
|
11
|
+
sortModel: SortItem[];
|
|
12
|
+
filterModel: Record<string, FilterModel>;
|
|
13
|
+
groupKeys: string[];
|
|
14
|
+
pivotCols: string[];
|
|
15
|
+
pivotMode: boolean;
|
|
16
|
+
success(params: {
|
|
17
|
+
rowData: Row[];
|
|
18
|
+
rowCount: number;
|
|
19
|
+
}): void;
|
|
20
|
+
fail(error?: unknown): void;
|
|
21
|
+
}
|
|
22
|
+
export interface IDatasource {
|
|
23
|
+
getRows(params: IDatasourceGetRowsParams): void;
|
|
24
|
+
destroy?(): void;
|
|
25
|
+
}
|
|
26
|
+
export type ServerRowModelState = 'idle' | 'loading' | 'loaded' | 'failed';
|
|
27
|
+
export interface BlockState {
|
|
28
|
+
startRow: number;
|
|
29
|
+
endRow: number;
|
|
30
|
+
state: ServerRowModelState;
|
|
31
|
+
rows: Row[];
|
|
32
|
+
error?: unknown;
|
|
33
|
+
}
|
|
34
|
+
export declare class ServerRowModel {
|
|
35
|
+
#private;
|
|
36
|
+
constructor(options?: {
|
|
37
|
+
blockSize?: number;
|
|
38
|
+
maxConcurrentRequests?: number;
|
|
39
|
+
});
|
|
40
|
+
get datasource(): IDatasource | null;
|
|
41
|
+
set datasource(ds: IDatasource | null);
|
|
42
|
+
get blockSize(): number;
|
|
43
|
+
set blockSize(size: number);
|
|
44
|
+
get totalRowCount(): number;
|
|
45
|
+
get isLoading(): boolean;
|
|
46
|
+
get loadedBlockCount(): number;
|
|
47
|
+
setRequestParams(params: {
|
|
48
|
+
sortModel?: SortItem[];
|
|
49
|
+
filterModel?: Record<string, FilterModel>;
|
|
50
|
+
groupKeys?: string[];
|
|
51
|
+
pivotCols?: string[];
|
|
52
|
+
pivotMode?: boolean;
|
|
53
|
+
}): void;
|
|
54
|
+
getBlockForRow(rowIndex: number): number;
|
|
55
|
+
getRow(rowIndex: number): Row | undefined;
|
|
56
|
+
getBlockState(blockIndex: number): BlockState | undefined;
|
|
57
|
+
isBlockLoaded(blockIndex: number): boolean;
|
|
58
|
+
isBlockLoading(blockIndex: number): boolean;
|
|
59
|
+
requestBlock(blockIndex: number, callbacks?: {
|
|
60
|
+
onSuccess?: (block: BlockState) => void;
|
|
61
|
+
onFail?: (block: BlockState) => void;
|
|
62
|
+
}): void;
|
|
63
|
+
ensureBlocksForRange(startRow: number, endRow: number, callbacks?: {
|
|
64
|
+
onSuccess?: (block: BlockState) => void;
|
|
65
|
+
onFail?: (block: BlockState) => void;
|
|
66
|
+
}): void;
|
|
67
|
+
retryBlock(blockIndex: number, callbacks?: {
|
|
68
|
+
onSuccess?: (block: BlockState) => void;
|
|
69
|
+
onFail?: (block: BlockState) => void;
|
|
70
|
+
}): boolean;
|
|
71
|
+
purgeCache(): void;
|
|
72
|
+
purgeBlock(blockIndex: number): boolean;
|
|
73
|
+
get cacheBlockCount(): number;
|
|
74
|
+
destroy(): void;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=datasource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datasource.d.ts","sourceRoot":"","sources":["../../../src/core/datas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,CAAC,EAAE;QACV,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;QACxC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;KACtC,GACA,OAAO;IAcV,UAAU,IAAI,IAAI;IAMlB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAIvC,IAAI,eAAe,IAAI,MAAM,CAE5B;IAID,OAAO,IAAI,IAAI;CAOhB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client-side filter engine.
|
|
3
|
+
*
|
|
4
|
+
* Applies text, number, date, and set filters to row data.
|
|
5
|
+
* Supports single-condition and dual-condition (AND/OR) filtering.
|
|
6
|
+
* All filter operations are debounce-friendly — designed to be called
|
|
7
|
+
* after user input settles.
|
|
8
|
+
*/
|
|
9
|
+
import type { Row, FilterModel, ColumnDef } from '../types.js';
|
|
10
|
+
export declare class FilterEngine {
|
|
11
|
+
#private;
|
|
12
|
+
/**
|
|
13
|
+
* Filter rows by applying all active filters.
|
|
14
|
+
* Returns a new filtered array (does not mutate input).
|
|
15
|
+
*/
|
|
16
|
+
filter(rows: Row[], filterModel: Record<string, FilterModel>, _columns: ColumnDef[]): Row[];
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=filter-engine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-engine.d.ts","sourceRoot":"","sources":["../../../src/core/filter-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,GAAG,EACH,WAAW,EAMX,SAAS,EACV,MAAM,aAAa,CAAC;AAErB,qBAAa,YAAY;;IACvB;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,GAAG,EAAE;CAgL5F"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Find bar engine — Ctrl+F search across grid cells.
|
|
3
|
+
*
|
|
4
|
+
* Searches all visible columns, highlights matches,
|
|
5
|
+
* and supports navigation between matches.
|
|
6
|
+
*/
|
|
7
|
+
import type { Row, ColumnDef } from '../types.js';
|
|
8
|
+
export interface FindMatch {
|
|
9
|
+
rowIndex: number;
|
|
10
|
+
field: string;
|
|
11
|
+
startIndex: number;
|
|
12
|
+
endIndex: number;
|
|
13
|
+
}
|
|
14
|
+
export interface FindBarState {
|
|
15
|
+
open: boolean;
|
|
16
|
+
searchText: string;
|
|
17
|
+
caseSensitive: boolean;
|
|
18
|
+
matches: FindMatch[];
|
|
19
|
+
currentMatchIndex: number;
|
|
20
|
+
}
|
|
21
|
+
export declare class FindBar {
|
|
22
|
+
#private;
|
|
23
|
+
get isOpen(): boolean;
|
|
24
|
+
get searchText(): string;
|
|
25
|
+
get caseSensitive(): boolean;
|
|
26
|
+
set caseSensitive(value: boolean);
|
|
27
|
+
get matchCount(): number;
|
|
28
|
+
get currentMatchIndex(): number;
|
|
29
|
+
get currentMatch(): FindMatch | null;
|
|
30
|
+
get matches(): FindMatch[];
|
|
31
|
+
get state(): FindBarState;
|
|
32
|
+
/**
|
|
33
|
+
* Open the find bar.
|
|
34
|
+
*/
|
|
35
|
+
open(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Close the find bar and clear results.
|
|
38
|
+
*/
|
|
39
|
+
close(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Search across all visible columns for the given text.
|
|
42
|
+
*/
|
|
43
|
+
search(text: string, rows: Row[], columns: ColumnDef[]): FindMatch[];
|
|
44
|
+
/**
|
|
45
|
+
* Navigate to the next match.
|
|
46
|
+
*/
|
|
47
|
+
nextMatch(): FindMatch | null;
|
|
48
|
+
/**
|
|
49
|
+
* Navigate to the previous match.
|
|
50
|
+
*/
|
|
51
|
+
previousMatch(): FindMatch | null;
|
|
52
|
+
/**
|
|
53
|
+
* Check if a specific cell contains any match.
|
|
54
|
+
*/
|
|
55
|
+
hasMatch(rowIndex: number, field: string): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Check if a specific cell contains the current match.
|
|
58
|
+
*/
|
|
59
|
+
isCurrentMatch(rowIndex: number, field: string): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Get all matches in a specific cell.
|
|
62
|
+
*/
|
|
63
|
+
getMatchesInCell(rowIndex: number, field: string): FindMatch[];
|
|
64
|
+
/**
|
|
65
|
+
* Render the find bar as HTML.
|
|
66
|
+
*/
|
|
67
|
+
render(): string;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=find-bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-bar.d.ts","sourceRoot":"","sources":["../../../src/core/find-bar.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIlD,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAID,qBAAa,OAAO;;IAOlB,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED,IAAI,aAAa,CAAC,KAAK,EAAE,OAAO,EAE/B;IAED,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,IAAI,iBAAiB,IAAI,MAAM,CAE9B;IAED,IAAI,YAAY,IAAI,SAAS,GAAG,IAAI,CAKnC;IAED,IAAI,OAAO,IAAI,SAAS,EAAE,CAEzB;IAED,IAAI,KAAK,IAAI,YAAY,CAQxB;IAED;;OAEG;IACH,IAAI,IAAI,IAAI;IAIZ;;OAEG;IACH,KAAK,IAAI,IAAI;IAOb;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE;IA2CpE;;OAEG;IACH,SAAS,IAAI,SAAS,GAAG,IAAI;IAM7B;;OAEG;IACH,aAAa,IAAI,SAAS,GAAG,IAAI;IAOjC;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;IAIlD;;OAEG;IACH,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;IAMxD;;OAEG;IACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE;IAI9D;;OAEG;IACH,MAAM,IAAI,MAAM;CA8BjB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Focus manager using roving tabindex pattern.
|
|
3
|
+
*
|
|
4
|
+
* Ensures only one cell in the grid has tabindex="0" at a time.
|
|
5
|
+
* All other cells have tabindex="-1". This lets the grid behave
|
|
6
|
+
* as a single tab stop while supporting arrow-key navigation inside.
|
|
7
|
+
*/
|
|
8
|
+
export declare class FocusManager {
|
|
9
|
+
#private;
|
|
10
|
+
attach(container: HTMLElement): void;
|
|
11
|
+
detach(): void;
|
|
12
|
+
/**
|
|
13
|
+
* Set focus on a cell by row and column indices.
|
|
14
|
+
*/
|
|
15
|
+
focusCell(rowIndex: number, colIndex: number): void;
|
|
16
|
+
/**
|
|
17
|
+
* Ensure the grid container itself is focusable as a fallback.
|
|
18
|
+
*/
|
|
19
|
+
ensureGridFocusable(): void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=focus-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus-manager.d.ts","sourceRoot":"","sources":["../../../src/core/focus-manager.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,qBAAa,YAAY;;IAIvB,MAAM,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI;IAIpC,MAAM,IAAI,IAAI;IAId;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAoBnD;;OAEG;IACH,mBAAmB,IAAI,IAAI;CAM5B"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* State persistence for the data grid.
|
|
3
|
+
*
|
|
4
|
+
* Captures and restores grid state: sort model, filter model, column state,
|
|
5
|
+
* selection, pagination, grouping, expanded rows, and scroll position.
|
|
6
|
+
*/
|
|
7
|
+
import type { SortItem, FilterModel, ColumnDef } from '../types.js';
|
|
8
|
+
export interface ColumnState {
|
|
9
|
+
field: string;
|
|
10
|
+
width?: number;
|
|
11
|
+
visible?: boolean;
|
|
12
|
+
pinned?: 'left' | 'right' | false;
|
|
13
|
+
sort?: 'asc' | 'desc' | null;
|
|
14
|
+
sortIndex?: number;
|
|
15
|
+
flex?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface GridState {
|
|
18
|
+
sortModel?: SortItem[];
|
|
19
|
+
filterModel?: Record<string, FilterModel>;
|
|
20
|
+
columnState?: ColumnState[];
|
|
21
|
+
selectedRowKeys?: string[];
|
|
22
|
+
currentPage?: number;
|
|
23
|
+
pageSize?: number;
|
|
24
|
+
groupColumns?: string[];
|
|
25
|
+
expandedGroups?: string[];
|
|
26
|
+
expandedRows?: string[];
|
|
27
|
+
scrollTop?: number;
|
|
28
|
+
scrollLeft?: number;
|
|
29
|
+
quickFilterText?: string;
|
|
30
|
+
}
|
|
31
|
+
export type GridStateKey = keyof GridState;
|
|
32
|
+
export declare class GridStateManager {
|
|
33
|
+
#private;
|
|
34
|
+
captureState(params: {
|
|
35
|
+
sortModel?: SortItem[];
|
|
36
|
+
filterModel?: Record<string, FilterModel>;
|
|
37
|
+
columns?: ColumnDef[];
|
|
38
|
+
columnWidths?: Map<string, number>;
|
|
39
|
+
columnVisibility?: Map<string, boolean>;
|
|
40
|
+
selectedRowKeys?: string[];
|
|
41
|
+
currentPage?: number;
|
|
42
|
+
pageSize?: number;
|
|
43
|
+
groupColumns?: string[];
|
|
44
|
+
expandedGroups?: string[];
|
|
45
|
+
expandedRows?: string[];
|
|
46
|
+
scrollTop?: number;
|
|
47
|
+
scrollLeft?: number;
|
|
48
|
+
quickFilterText?: string;
|
|
49
|
+
}): GridState;
|
|
50
|
+
getState(): GridState;
|
|
51
|
+
setState(state: GridState): void;
|
|
52
|
+
getStateValue<K extends GridStateKey>(key: K): GridState[K];
|
|
53
|
+
setStateValue<K extends GridStateKey>(key: K, value: GridState[K]): void;
|
|
54
|
+
resetState(keys?: GridStateKey[]): GridState;
|
|
55
|
+
diffState(otherState: GridState): GridStateKey[];
|
|
56
|
+
setStorageKey(key: string | null): void;
|
|
57
|
+
get storageKey(): string | null;
|
|
58
|
+
setAutoSaveKeys(keys: GridStateKey[]): void;
|
|
59
|
+
saveToStorage(): boolean;
|
|
60
|
+
loadFromStorage(): GridState | null;
|
|
61
|
+
clearStorage(): void;
|
|
62
|
+
toJSON(): string;
|
|
63
|
+
fromJSON(json: string): GridState | null;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=grid-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid-state.d.ts","sourceRoot":"","sources":["../../../src/core/grid-state.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIpE,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* Loads rows in blocks as the user scrolls, integrating with a datasource
|
|
5
|
+
* for on-demand data fetching. Provides loading indicators per block.
|
|
6
|
+
*/
|
|
7
|
+
import type { Row, SortItem, FilterModel } from '../types.js';
|
|
8
|
+
import type { IDatasource } from './datasource.js';
|
|
9
|
+
export interface InfiniteScrollConfig {
|
|
10
|
+
blockSize?: number;
|
|
11
|
+
maxBlocksInCache?: number;
|
|
12
|
+
overscanBlocks?: number;
|
|
13
|
+
cacheOverflowSize?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface InfiniteBlockInfo {
|
|
16
|
+
blockIndex: number;
|
|
17
|
+
startRow: number;
|
|
18
|
+
endRow: number;
|
|
19
|
+
state: 'idle' | 'loading' | 'loaded' | 'failed';
|
|
20
|
+
hasData: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare class InfiniteScroll {
|
|
23
|
+
#private;
|
|
24
|
+
constructor(config?: InfiniteScrollConfig);
|
|
25
|
+
get datasource(): IDatasource | null;
|
|
26
|
+
set datasource(ds: IDatasource | null);
|
|
27
|
+
get blockSize(): number;
|
|
28
|
+
get totalRowCount(): number;
|
|
29
|
+
get isLoading(): boolean;
|
|
30
|
+
setParams(params: {
|
|
31
|
+
sortModel?: SortItem[];
|
|
32
|
+
filterModel?: Record<string, FilterModel>;
|
|
33
|
+
}): void;
|
|
34
|
+
getRow(rowIndex: number): Row | undefined;
|
|
35
|
+
isRowLoaded(rowIndex: number): boolean;
|
|
36
|
+
isRowLoading(rowIndex: number): boolean;
|
|
37
|
+
onViewportChanged(startRow: number, endRow: number, callbacks?: {
|
|
38
|
+
onBlockLoaded?: (blockIndex: number) => void;
|
|
39
|
+
onBlockFailed?: (blockIndex: number) => void;
|
|
40
|
+
}): void;
|
|
41
|
+
getBlockInfo(blockIndex: number): InfiniteBlockInfo;
|
|
42
|
+
getLoadedBlockIndices(): number[];
|
|
43
|
+
retryBlock(blockIndex: number, callbacks?: {
|
|
44
|
+
onBlockLoaded?: (blockIndex: number) => void;
|
|
45
|
+
onBlockFailed?: (blockIndex: number) => void;
|
|
46
|
+
}): boolean;
|
|
47
|
+
reset(): void;
|
|
48
|
+
destroy(): void;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=infinite-scroll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infinite-scroll.d.ts","sourceRoot":"","sources":["../../../src/core/infinite-scroll.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAc,MAAM,iBAAiB,CAAC;AAI/D,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAChD,OAAO,EAAE,OAAO,CAAC;CAClB;AAID,qBAAa,cAAc;;gBAab,MAAM,GAAE,oBAAyB;IAQ7C,IAAI,UAAU,IAAI,WAAW,GAAG,IAAI,CAEnC;IAED,IAAI,UAAU,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,EAMpC;IAED,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED,IAAI,SAAS,IAAI,OAAO,CAEvB;IAID,SAAS,CAAC,MAAM,EAAE;QAAE,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;KAAE,GAAG,IAAI;IAmB9F,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,GAAG,SAAS;IAYzC,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAKtC,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAQvC,iBAAiB,CACf,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE;QACV,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;QAC7C,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;KAC9C,GACA,IAAI;IAkBP,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,iBAAiB;IAWnD,qBAAqB,IAAI,MAAM,EAAE;IAUjC,UAAU,CACR,UAAU,EAAE,MAAM,EAClB,SAAS,CAAC,EAAE;QACV,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;QAC7C,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;KAC9C,GACA,OAAO;IAWV,KAAK,IAAI,IAAI;IASb,OAAO,IAAI,IAAI;CAkHhB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keyboard navigation controller.
|
|
3
|
+
*
|
|
4
|
+
* Implements ARIA grid keyboard patterns: arrow keys, Home/End,
|
|
5
|
+
* Ctrl+Home/End, Page Up/Down, Enter/F2 for edit, Space for select.
|
|
6
|
+
*/
|
|
7
|
+
export interface GridPosition {
|
|
8
|
+
rowIndex: number;
|
|
9
|
+
colIndex: number;
|
|
10
|
+
}
|
|
11
|
+
export interface KeyboardNavOptions {
|
|
12
|
+
rowCount: number;
|
|
13
|
+
colCount: number;
|
|
14
|
+
pageSize: number;
|
|
15
|
+
onNavigate: (position: GridPosition) => void;
|
|
16
|
+
onActivate: (position: GridPosition) => void;
|
|
17
|
+
onSelect: (position: GridPosition) => void;
|
|
18
|
+
onEscape: () => void;
|
|
19
|
+
}
|
|
20
|
+
export declare class KeyboardNav {
|
|
21
|
+
#private;
|
|
22
|
+
constructor(options: KeyboardNavOptions);
|
|
23
|
+
get position(): GridPosition;
|
|
24
|
+
set position(pos: GridPosition);
|
|
25
|
+
updateBounds(rowCount: number, colCount: number): void;
|
|
26
|
+
handleKeyDown(event: KeyboardEvent): boolean;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=keyboard-nav.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyboard-nav.d.ts","sourceRoot":"","sources":["../../../src/core/keyboard-nav.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;IAC7C,UAAU,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;IAC7C,QAAQ,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;IAC3C,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,qBAAa,WAAW;;gBAIV,OAAO,EAAE,kBAAkB;IAIvC,IAAI,QAAQ,IAAI,YAAY,CAE3B;IAED,IAAI,QAAQ,CAAC,GAAG,EAAE,YAAY,EAK7B;IAED,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAOtD,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO;CAiH7C"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internationalization (i18n) system for the data grid.
|
|
3
|
+
*
|
|
4
|
+
* Provides a complete locale text system with overridable strings,
|
|
5
|
+
* RTL direction support, and number/date formatting helpers.
|
|
6
|
+
*/
|
|
7
|
+
export interface LocaleText {
|
|
8
|
+
page: string;
|
|
9
|
+
of: string;
|
|
10
|
+
to: string;
|
|
11
|
+
rows: string;
|
|
12
|
+
firstPage: string;
|
|
13
|
+
previousPage: string;
|
|
14
|
+
nextPage: string;
|
|
15
|
+
lastPage: string;
|
|
16
|
+
sortAscending: string;
|
|
17
|
+
sortDescending: string;
|
|
18
|
+
clearSort: string;
|
|
19
|
+
filterPlaceholder: string;
|
|
20
|
+
contains: string;
|
|
21
|
+
notContains: string;
|
|
22
|
+
equals: string;
|
|
23
|
+
notEquals: string;
|
|
24
|
+
startsWith: string;
|
|
25
|
+
endsWith: string;
|
|
26
|
+
greaterThan: string;
|
|
27
|
+
lessThan: string;
|
|
28
|
+
greaterThanOrEqual: string;
|
|
29
|
+
lessThanOrEqual: string;
|
|
30
|
+
inRange: string;
|
|
31
|
+
clearFilter: string;
|
|
32
|
+
applyFilter: string;
|
|
33
|
+
noFilter: string;
|
|
34
|
+
selectAll: string;
|
|
35
|
+
selectNone: string;
|
|
36
|
+
selected: string;
|
|
37
|
+
columnMenu: string;
|
|
38
|
+
hideColumn: string;
|
|
39
|
+
pinLeft: string;
|
|
40
|
+
pinRight: string;
|
|
41
|
+
unpin: string;
|
|
42
|
+
autoSize: string;
|
|
43
|
+
totalRows: string;
|
|
44
|
+
filteredRows: string;
|
|
45
|
+
selectedRows: string;
|
|
46
|
+
sum: string;
|
|
47
|
+
avg: string;
|
|
48
|
+
min: string;
|
|
49
|
+
max: string;
|
|
50
|
+
count: string;
|
|
51
|
+
loading: string;
|
|
52
|
+
noRowsToShow: string;
|
|
53
|
+
copy: string;
|
|
54
|
+
cut: string;
|
|
55
|
+
paste: string;
|
|
56
|
+
exportCsv: string;
|
|
57
|
+
exportExcel: string;
|
|
58
|
+
exportJson: string;
|
|
59
|
+
findPlaceholder: string;
|
|
60
|
+
matchesFound: string;
|
|
61
|
+
noMatches: string;
|
|
62
|
+
rowDragSingle: string;
|
|
63
|
+
rowDragMultiple: string;
|
|
64
|
+
search: string;
|
|
65
|
+
reset: string;
|
|
66
|
+
cancel: string;
|
|
67
|
+
apply: string;
|
|
68
|
+
ok: string;
|
|
69
|
+
}
|
|
70
|
+
export type LocaleTextOverrides = Partial<LocaleText>;
|
|
71
|
+
export type TextDirection = 'ltr' | 'rtl';
|
|
72
|
+
export declare class Locale {
|
|
73
|
+
#private;
|
|
74
|
+
getText(key: keyof LocaleText): string;
|
|
75
|
+
getTextWithParams(key: keyof LocaleText, params: Record<string, string | number>): string;
|
|
76
|
+
setLocaleText(overrides: LocaleTextOverrides): void;
|
|
77
|
+
mergeLocaleText(overrides: LocaleTextOverrides): void;
|
|
78
|
+
resetLocaleText(): void;
|
|
79
|
+
get overrides(): LocaleTextOverrides;
|
|
80
|
+
get direction(): TextDirection;
|
|
81
|
+
set direction(dir: TextDirection);
|
|
82
|
+
get isRtl(): boolean;
|
|
83
|
+
formatNumber(value: number, locale?: string): string;
|
|
84
|
+
formatDate(value: Date, options?: Intl.DateTimeFormatOptions, locale?: string): string;
|
|
85
|
+
formatCurrency(value: number, currency?: string, locale?: string): string;
|
|
86
|
+
getAllText(): LocaleText;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=locale.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../../src/core/locale.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,UAAU;IAEzB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,M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M;IAQtF,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,SAAQ,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM;IAUxE,UAAU,IAAI,UAAU;CAGzB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pagination state manager.
|
|
3
|
+
*
|
|
4
|
+
* Handles page navigation, page size changes, and provides
|
|
5
|
+
* the row slice for the current page. Works for both client-side
|
|
6
|
+
* and server-side pagination modes.
|
|
7
|
+
*/
|
|
8
|
+
import type { Row } from '../types.js';
|
|
9
|
+
export interface PaginationState {
|
|
10
|
+
currentPage: number;
|
|
11
|
+
pageSize: number;
|
|
12
|
+
totalRows: number;
|
|
13
|
+
totalPages: number;
|
|
14
|
+
}
|
|
15
|
+
export declare class Pagination {
|
|
16
|
+
#private;
|
|
17
|
+
constructor(pageSize?: number);
|
|
18
|
+
get currentPage(): number;
|
|
19
|
+
set currentPage(value: number);
|
|
20
|
+
get pageSize(): number;
|
|
21
|
+
set pageSize(value: number);
|
|
22
|
+
get totalRows(): number;
|
|
23
|
+
set totalRows(value: number);
|
|
24
|
+
get totalPages(): number;
|
|
25
|
+
get startRow(): number;
|
|
26
|
+
get endRow(): number;
|
|
27
|
+
get isFirstPage(): boolean;
|
|
28
|
+
get isLastPage(): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Slice rows for the current page (client-side pagination).
|
|
31
|
+
*/
|
|
32
|
+
getPageRows(rows: Row[]): Row[];
|
|
33
|
+
/**
|
|
34
|
+
* Navigate to a specific page.
|
|
35
|
+
*/
|
|
36
|
+
goToPage(page: number): void;
|
|
37
|
+
/**
|
|
38
|
+
* Go to the next page.
|
|
39
|
+
*/
|
|
40
|
+
nextPage(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Go to the previous page.
|
|
43
|
+
*/
|
|
44
|
+
prevPage(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Go to the first page.
|
|
47
|
+
*/
|
|
48
|
+
firstPage(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Go to the last page.
|
|
51
|
+
*/
|
|
52
|
+
lastPage(): void;
|
|
53
|
+
/**
|
|
54
|
+
* Get the current pagination state snapshot.
|
|
55
|
+
*/
|
|
56
|
+
getState(): PaginationState;
|
|
57
|
+
/**
|
|
58
|
+
* Get the page numbers to display (with ellipsis logic).
|
|
59
|
+
* Returns an array of page numbers and -1 for ellipsis.
|
|
60
|
+
*/
|
|
61
|
+
getPageNumbers(maxVisible?: number): number[];
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=pagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../src/core/pagination.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,UAAU;;gBAKT,QAAQ,SAAK;IAIzB,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,WAAW,CAAC,KAAK,EAAE,MAAM,EAE5B;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAMzB;IAED,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,SAAS,CAAC,KAAK,EAAE,MAAM,EAK1B;IAED,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;IAED;;OAEG;IACH,WAAW,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG,EAAE;IAI/B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI5B;;OAEG;IACH,QAAQ,IAAI,IAAI;IAMhB;;OAEG;IACH,QAAQ,IAAI,IAAI;IAMhB;;OAEG;IACH,SAAS,IAAI,IAAI;IAIjB;;OAEG;IACH,QAAQ,IAAI,IAAI;IAIhB;;OAEG;IACH,QAAQ,IAAI,eAAe;IAS3B;;;OAGG;IACH,cAAc,CAAC,UAAU,SAAI,GAAG,MAAM,EAAE;CA0BzC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quick filter — global text search across all columns.
|
|
3
|
+
*
|
|
4
|
+
* Converts a search term into a fast row-level matching function
|
|
5
|
+
* that checks all visible column values. Case-insensitive by default.
|
|
6
|
+
*/
|
|
7
|
+
import type { Row, ColumnDef } from '../types.js';
|
|
8
|
+
export declare class QuickFilter {
|
|
9
|
+
#private;
|
|
10
|
+
get text(): string;
|
|
11
|
+
set text(value: string);
|
|
12
|
+
/**
|
|
13
|
+
* Apply the quick filter to the dataset.
|
|
14
|
+
* Returns filtered rows (does not mutate input).
|
|
15
|
+
*/
|
|
16
|
+
filter(rows: Row[], columns: ColumnDef[]): Row[];
|
|
17
|
+
/**
|
|
18
|
+
* Get unique values for a specific column (for set filter suggestions).
|
|
19
|
+
*/
|
|
20
|
+
getUniqueValues(rows: Row[], field: string): unknown[];
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=quick-filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quick-filter.d.ts","sourceRoot":"","sources":["../../../src/core/quick-filter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAElD,qBAAa,WAAW;;IAKtB,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAErB;IAED;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,GAAG,EAAE;IAmChD;;OAEG;IACH,eAAe,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE;CAYvD"}
|