@duskmoon-dev/el-pro-data-grid 0.8.2 → 0.9.0
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,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Row drag engine — managed row reordering via drag-and-drop.
|
|
3
|
+
*
|
|
4
|
+
* Supports single and multi-row drag, managed/unmanaged modes,
|
|
5
|
+
* and external drop zones.
|
|
6
|
+
*/
|
|
7
|
+
import type { Row } from '../types.js';
|
|
8
|
+
export interface RowDragConfig {
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
managed?: boolean;
|
|
11
|
+
multiRow?: boolean;
|
|
12
|
+
dragHandleColumn?: boolean;
|
|
13
|
+
rowDragText?: (row: Row) => string;
|
|
14
|
+
}
|
|
15
|
+
export interface DragState {
|
|
16
|
+
active: boolean;
|
|
17
|
+
draggedRows: Row[];
|
|
18
|
+
sourceIndex: number;
|
|
19
|
+
targetIndex: number;
|
|
20
|
+
}
|
|
21
|
+
export interface DropResult {
|
|
22
|
+
rows: Row[];
|
|
23
|
+
fromIndices: number[];
|
|
24
|
+
toIndex: number;
|
|
25
|
+
}
|
|
26
|
+
export declare class RowDrag {
|
|
27
|
+
#private;
|
|
28
|
+
get enabled(): boolean;
|
|
29
|
+
set enabled(value: boolean);
|
|
30
|
+
get managed(): boolean;
|
|
31
|
+
get multiRow(): boolean;
|
|
32
|
+
get dragState(): DragState;
|
|
33
|
+
get isDragging(): boolean;
|
|
34
|
+
configure(config: RowDragConfig): void;
|
|
35
|
+
/**
|
|
36
|
+
* Start dragging one or more rows.
|
|
37
|
+
*/
|
|
38
|
+
startDrag(rows: Row[], sourceIndex: number): void;
|
|
39
|
+
/**
|
|
40
|
+
* Update the target drop position.
|
|
41
|
+
*/
|
|
42
|
+
updateTarget(targetIndex: number): void;
|
|
43
|
+
/**
|
|
44
|
+
* End drag and compute the reorder result (for managed mode).
|
|
45
|
+
* Returns the drop result containing the new row arrangement.
|
|
46
|
+
*/
|
|
47
|
+
endDrag(allRows: Row[], rowKey?: string): DropResult | null;
|
|
48
|
+
/**
|
|
49
|
+
* Cancel the drag operation.
|
|
50
|
+
*/
|
|
51
|
+
cancelDrag(): void;
|
|
52
|
+
/**
|
|
53
|
+
* Get the drag text for the currently dragged row(s).
|
|
54
|
+
*/
|
|
55
|
+
getDragText(): string;
|
|
56
|
+
/**
|
|
57
|
+
* Whether to show a drag handle column.
|
|
58
|
+
*/
|
|
59
|
+
get showDragHandle(): boolean;
|
|
60
|
+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AAC,OAAO,EAAE,GAAG,EAAE,EAAE,MAAM,SAAO,GAAG,UAAU,GAAG,IAAI;IAmCzD;;OAEG;IACH,UAAU,IAAI,IAAI;IAIlB;;OAEG;IACH,WAAW,IAAI,MAAM;IAarB;;OAEG;IACH,IAAI,cAAc,IAAI,OAAO,CAE5B;CACF"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Row expander — manages expandable detail panels below rows.
|
|
3
|
+
*
|
|
4
|
+
* Supports:
|
|
5
|
+
* - Single and multiple expansion (accordion mode)
|
|
6
|
+
* - Lazy content creation and destroy-on-collapse
|
|
7
|
+
* - Custom content renderer via callback
|
|
8
|
+
* - Expand/collapse state tracking
|
|
9
|
+
* - Integration with virtual scrolling
|
|
10
|
+
*/
|
|
11
|
+
import type { Row } from '../types.js';
|
|
12
|
+
export interface RowExpanderConfig {
|
|
13
|
+
rowKey?: string;
|
|
14
|
+
multiple?: boolean;
|
|
15
|
+
expandHeight?: number | 'auto';
|
|
16
|
+
isExpandable?: (row: Row) => boolean;
|
|
17
|
+
getContent?: (row: Row, container: HTMLElement) => void | HTMLElement;
|
|
18
|
+
lazyContent?: boolean;
|
|
19
|
+
destroyOnCollapse?: boolean;
|
|
20
|
+
expandOnRowClick?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare class RowExpander {
|
|
23
|
+
#private;
|
|
24
|
+
constructor(config?: RowExpanderConfig);
|
|
25
|
+
configure(config: RowExpanderConfig): void;
|
|
26
|
+
get expandedIds(): string[];
|
|
27
|
+
get expandOnRowClick(): boolean;
|
|
28
|
+
get expandHeight(): number | 'auto';
|
|
29
|
+
/**
|
|
30
|
+
* Check if a row can be expanded.
|
|
31
|
+
*/
|
|
32
|
+
canExpand(row: Row): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Check if a row is currently expanded.
|
|
35
|
+
*/
|
|
36
|
+
isExpanded(row: Row): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Expand a row. Returns true if state changed.
|
|
39
|
+
*/
|
|
40
|
+
expandRow(row: Row): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Collapse a row. Returns true if state changed.
|
|
43
|
+
*/
|
|
44
|
+
collapseRow(row: Row): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Toggle a row's expand state.
|
|
47
|
+
*/
|
|
48
|
+
toggleRow(row: Row): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Expand all expandable rows.
|
|
51
|
+
*/
|
|
52
|
+
expandAllRows(rows: Row[]): void;
|
|
53
|
+
/**
|
|
54
|
+
* Collapse all rows.
|
|
55
|
+
*/
|
|
56
|
+
collapseAllRows(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Get the content element for an expanded row.
|
|
59
|
+
* Supports lazy creation and caching.
|
|
60
|
+
*/
|
|
61
|
+
getContentElement(row: Row): HTMLElement | null;
|
|
62
|
+
/**
|
|
63
|
+
* Get total expanded row count for height calculation.
|
|
64
|
+
*/
|
|
65
|
+
getExpandedCount(): number;
|
|
66
|
+
/**
|
|
67
|
+
* Clear all state and cache.
|
|
68
|
+
*/
|
|
69
|
+
clear(): void;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=row-expander.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-expander.d.ts","sourceRoot":"","sources":["../../../src/core/row-expander.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAIvC,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;IACrC,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,WAAW,KAAK,IAAI,GAAG,WAAW,CAAC;IACtE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAID,qBAAa,WAAW;;gBAYV,MAAM,GAAE,iBAAsB;IAI1C,SAAS,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI;IAW1C,IAAI,WAAW,IAAI,MAAM,EAAE,CAE1B;IAED,IAAI,gBAAgB,IAAI,OAAO,CAE9B;IAED,IAAI,YAAY,IAAI,MAAM,GAAG,MAAM,CAElC;IAED;;OAEG;IACH,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO;IAO5B;;OAEG;IACH,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO;IAK7B;;OAEG;IACH,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO;IAe5B;;OAEG;IACH,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO;IAa9B;;OAEG;IACH,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO;IAU5B;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAQhC;;OAEG;IACH,eAAe,IAAI,IAAI;IAKvB;;;OAGG;IACH,iBAAiB,CAAC,GAAG,EAAE,GAAG,GAAG,WAAW,GAAG,IAAI;IA4B/C;;OAEG;IACH,gBAAgB,IAAI,MAAM;IAI1B;;OAEG;IACH,KAAK,IAAI,IAAI;CAQd"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Row grouping engine — groups flat rows into a hierarchical tree
|
|
3
|
+
* with expand/collapse, aggregation, and flat display list generation.
|
|
4
|
+
*
|
|
5
|
+
* Supports single and multi-column grouping with nested groups.
|
|
6
|
+
* Aggregation functions compute rollup values for group rows.
|
|
7
|
+
*/
|
|
8
|
+
import type { Row, ColumnDef } from '../types.js';
|
|
9
|
+
export interface RowNode {
|
|
10
|
+
data: Row;
|
|
11
|
+
id: string;
|
|
12
|
+
rowIndex: number;
|
|
13
|
+
level: number;
|
|
14
|
+
group: boolean;
|
|
15
|
+
expanded: boolean;
|
|
16
|
+
children: RowNode[];
|
|
17
|
+
allLeafChildren: RowNode[];
|
|
18
|
+
parent: RowNode | null;
|
|
19
|
+
key: string;
|
|
20
|
+
field: string;
|
|
21
|
+
aggData: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
export type AggFunc = 'sum' | 'avg' | 'min' | 'max' | 'count' | 'first' | 'last' | ((values: unknown[], rows: Row[]) => unknown);
|
|
24
|
+
export interface GroupingConfig {
|
|
25
|
+
groupColumns: string[];
|
|
26
|
+
groupDefaultExpanded: number;
|
|
27
|
+
aggFuncs?: Record<string, AggFunc>;
|
|
28
|
+
aggColumns?: {
|
|
29
|
+
field: string;
|
|
30
|
+
aggFunc: AggFunc;
|
|
31
|
+
}[];
|
|
32
|
+
}
|
|
33
|
+
export declare class RowGrouping {
|
|
34
|
+
#private;
|
|
35
|
+
get groupColumns(): string[];
|
|
36
|
+
set groupColumns(value: string[]);
|
|
37
|
+
get groupDefaultExpanded(): number;
|
|
38
|
+
set groupDefaultExpanded(value: number);
|
|
39
|
+
get expandedGroups(): string[];
|
|
40
|
+
get rootNodes(): RowNode[];
|
|
41
|
+
get isGrouped(): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Configure aggregation functions.
|
|
44
|
+
*/
|
|
45
|
+
setAggFuncs(funcs: Record<string, AggFunc>): void;
|
|
46
|
+
/**
|
|
47
|
+
* Configure which columns should be aggregated and with what function.
|
|
48
|
+
*/
|
|
49
|
+
setAggColumns(cols: {
|
|
50
|
+
field: string;
|
|
51
|
+
aggFunc: AggFunc;
|
|
52
|
+
}[]): void;
|
|
53
|
+
/**
|
|
54
|
+
* Build aggregation column list from column definitions.
|
|
55
|
+
*/
|
|
56
|
+
buildAggColumnsFromDefs(columns: ColumnDef[]): void;
|
|
57
|
+
/**
|
|
58
|
+
* Group rows and produce a flat display list.
|
|
59
|
+
* Returns the display list (mix of group rows and leaf rows).
|
|
60
|
+
*/
|
|
61
|
+
group(rows: Row[]): RowNode[];
|
|
62
|
+
/**
|
|
63
|
+
* Get the flat display list (call after group()).
|
|
64
|
+
*/
|
|
65
|
+
getDisplayList(): RowNode[];
|
|
66
|
+
/**
|
|
67
|
+
* Expand a group by its key path (e.g. "status=active" or "status=active|dept=eng").
|
|
68
|
+
*/
|
|
69
|
+
expandGroup(keyPath: string): void;
|
|
70
|
+
/**
|
|
71
|
+
* Collapse a group by its key path.
|
|
72
|
+
*/
|
|
73
|
+
collapseGroup(keyPath: string): void;
|
|
74
|
+
/**
|
|
75
|
+
* Toggle group expand/collapse.
|
|
76
|
+
*/
|
|
77
|
+
toggleGroup(keyPath: string): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Expand all groups to a given depth (-1 = all).
|
|
80
|
+
*/
|
|
81
|
+
expandAll(depth?: number): void;
|
|
82
|
+
/**
|
|
83
|
+
* Collapse all groups.
|
|
84
|
+
*/
|
|
85
|
+
collapseAll(): void;
|
|
86
|
+
/**
|
|
87
|
+
* Check if a group key path is expanded.
|
|
88
|
+
* Considers explicit expand/collapse state and default expansion depth.
|
|
89
|
+
*/
|
|
90
|
+
isExpanded(keyPath: string): boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Clear all state.
|
|
93
|
+
*/
|
|
94
|
+
clear(): void;
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=row-grouping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-grouping.d.ts","sourceRoot":"","sources":["../../../src/core/row-grouping.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIlD,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,GAAG,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ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IAIjD;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,EAAE,GAAG,IAAI;IAIhE;;OAEG;IACH,uBAAuB,CAAC,OAAO,EAAE,SAAS,EAAE,GAAG,IAAI;IAMnD;;;OAGG;IACH,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE;IAqB7B;;OAEG;IACH,cAAc,IAAI,OAAO,EAAE;IAI3B;;OAEG;IACH,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAMlC;;OAEG;IACH,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAgBpC;;OAEG;IACH,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAWrC;;OAEG;IACH,SAAS,CAAC,KAAK,SAAK,GAAG,IAAI;IAM3B;;OAEG;IACH,WAAW,IAAI,IAAI;IAOnB;;;OAGG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAapC;;OAEG;IACH,KAAK,IAAI,IAAI;CA4Md"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Row pinning engine — pin rows to the top or bottom of the grid.
|
|
3
|
+
*
|
|
4
|
+
* Pinned rows appear outside the scrollable area and are not affected
|
|
5
|
+
* by sorting or filtering.
|
|
6
|
+
*/
|
|
7
|
+
import type { Row } from '../types.js';
|
|
8
|
+
export interface PinnedRowsConfig {
|
|
9
|
+
topRows?: Row[];
|
|
10
|
+
bottomRows?: Row[];
|
|
11
|
+
}
|
|
12
|
+
export declare class RowPinning {
|
|
13
|
+
#private;
|
|
14
|
+
get topRows(): Row[];
|
|
15
|
+
set topRows(rows: Row[]);
|
|
16
|
+
get bottomRows(): Row[];
|
|
17
|
+
set bottomRows(rows: Row[]);
|
|
18
|
+
get topCount(): number;
|
|
19
|
+
get bottomCount(): number;
|
|
20
|
+
get hasTopRows(): boolean;
|
|
21
|
+
get hasBottomRows(): boolean;
|
|
22
|
+
get hasPinnedRows(): boolean;
|
|
23
|
+
configure(config: PinnedRowsConfig): void;
|
|
24
|
+
/**
|
|
25
|
+
* Pin a row to the top.
|
|
26
|
+
*/
|
|
27
|
+
pinTop(row: Row): void;
|
|
28
|
+
/**
|
|
29
|
+
* Pin a row to the bottom.
|
|
30
|
+
*/
|
|
31
|
+
pinBottom(row: Row): void;
|
|
32
|
+
/**
|
|
33
|
+
* Unpin a row (from either top or bottom).
|
|
34
|
+
*/
|
|
35
|
+
unpin(row: Row, rowKey?: string): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Check if a row is pinned (top or bottom).
|
|
38
|
+
*/
|
|
39
|
+
isPinned(row: Row, rowKey?: string): 'top' | 'bottom' | false;
|
|
40
|
+
/**
|
|
41
|
+
* Clear all pinned rows.
|
|
42
|
+
*/
|
|
43
|
+
clear(): void;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=row-pinning.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-pinning.d.ts","sourceRoot":"","sources":["../../../src/core/row-pinning.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAIvC,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC;CACpB;AAID,qBAAa,UAAU;;IAIrB,IAAI,OAAO,IAAI,GAAG,EAAE,CAEnB;IAED,IAAI,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,EAEtB;IAED,IAAI,UAAU,IAAI,GAAG,EAAE,CAEtB;IAED,IAAI,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,EAEzB;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;IAED,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED,SAAS,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI;IAKzC;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI;IAItB;;OAEG;IACH,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI;IAIzB;;OAEG;IACH,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,SAAO,GAAG,OAAO;IAmBvC;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,SAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,KAAK;IAO3D;;OAEG;IACH,KAAK,IAAI,IAAI;CAId"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Row pivot engine — turns column values into dynamic columns.
|
|
3
|
+
*
|
|
4
|
+
* In pivot mode, one or more pivot columns have their distinct values
|
|
5
|
+
* turned into new column headers. Combined with row grouping and
|
|
6
|
+
* aggregation, this provides Excel-like pivot table functionality.
|
|
7
|
+
*/
|
|
8
|
+
import type { Row, ColumnDef } from '../types.js';
|
|
9
|
+
import type { AggFunc } from './row-grouping.js';
|
|
10
|
+
export interface PivotConfig {
|
|
11
|
+
pivotColumns: string[];
|
|
12
|
+
valueColumns: {
|
|
13
|
+
field: string;
|
|
14
|
+
aggFunc: AggFunc;
|
|
15
|
+
}[];
|
|
16
|
+
}
|
|
17
|
+
export interface PivotResult {
|
|
18
|
+
columns: ColumnDef[];
|
|
19
|
+
rows: Row[];
|
|
20
|
+
pivotKeys: string[];
|
|
21
|
+
}
|
|
22
|
+
export declare class RowPivot {
|
|
23
|
+
#private;
|
|
24
|
+
get pivotColumns(): string[];
|
|
25
|
+
set pivotColumns(value: string[]);
|
|
26
|
+
get valueColumns(): {
|
|
27
|
+
field: string;
|
|
28
|
+
aggFunc: AggFunc;
|
|
29
|
+
}[];
|
|
30
|
+
set valueColumns(value: {
|
|
31
|
+
field: string;
|
|
32
|
+
aggFunc: AggFunc;
|
|
33
|
+
}[]);
|
|
34
|
+
get isActive(): boolean;
|
|
35
|
+
setCustomAggFuncs(funcs: Record<string, AggFunc>): void;
|
|
36
|
+
/**
|
|
37
|
+
* Pivot the data: create dynamic columns from pivot field values
|
|
38
|
+
* and aggregate values into them.
|
|
39
|
+
*
|
|
40
|
+
* @param rows Source rows (already filtered/sorted)
|
|
41
|
+
* @param groupColumns Fields used for row grouping (appear as row keys)
|
|
42
|
+
* @param originalColumns Original column definitions
|
|
43
|
+
*/
|
|
44
|
+
pivot(rows: Row[], groupColumns: string[], originalColumns: ColumnDef[]): PivotResult;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=row-pivot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-pivot.d.ts","sourceRoot":"","sources":["../../../src/core/row-pivot.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAIjD,MAAM,WAAW,WAAW;IAC1B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;CACrD;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAgDD,qBAAa,QAAQ;;IAKnB,IAAI,YAAY,IAAI,MAAM,EAAE,CAE3B;IAED,IAAI,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,EAE/B;IAED,IAAI,YAAY,IAAI;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,EAAE,CAExD;IAED,IAAI,YAAY,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,EAAE,EAE5D;IAED,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,iBAAiB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAIvD;;;;;;;OAOG;IACH,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,eAAe,EAAE,SAAS,EAAE,GAAG,WAAW;CA6ItF"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Row styling and advanced row features — row numbers, variable heights,
|
|
3
|
+
* full-width rows, row classes/styles.
|
|
4
|
+
*/
|
|
5
|
+
import type { Row, ColumnDef } from '../types.js';
|
|
6
|
+
export interface RowStylingConfig {
|
|
7
|
+
getRowClass?: (params: RowClassParams) => string;
|
|
8
|
+
getRowStyle?: (params: RowStyleParams) => Record<string, string>;
|
|
9
|
+
getRowHeight?: (params: RowHeightParams) => number;
|
|
10
|
+
isFullWidthRow?: (row: Row) => boolean;
|
|
11
|
+
fullWidthRenderer?: (row: Row) => string | HTMLElement;
|
|
12
|
+
showRowNumbers?: boolean;
|
|
13
|
+
animateRows?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface RowClassParams {
|
|
16
|
+
row: Row;
|
|
17
|
+
rowIndex: number;
|
|
18
|
+
data: Row;
|
|
19
|
+
}
|
|
20
|
+
export interface RowStyleParams {
|
|
21
|
+
row: Row;
|
|
22
|
+
rowIndex: number;
|
|
23
|
+
data: Row;
|
|
24
|
+
}
|
|
25
|
+
export interface RowHeightParams {
|
|
26
|
+
row: Row;
|
|
27
|
+
rowIndex: number;
|
|
28
|
+
}
|
|
29
|
+
export declare class RowStyling {
|
|
30
|
+
#private;
|
|
31
|
+
get showRowNumbers(): boolean;
|
|
32
|
+
set showRowNumbers(value: boolean);
|
|
33
|
+
get animateRows(): boolean;
|
|
34
|
+
set animateRows(value: boolean);
|
|
35
|
+
configure(config: RowStylingConfig): void;
|
|
36
|
+
/**
|
|
37
|
+
* Get CSS class string for a row.
|
|
38
|
+
*/
|
|
39
|
+
getRowClass(row: Row, rowIndex: number): string;
|
|
40
|
+
/**
|
|
41
|
+
* Get inline style object for a row.
|
|
42
|
+
*/
|
|
43
|
+
getRowStyle(row: Row, rowIndex: number): Record<string, string>;
|
|
44
|
+
/**
|
|
45
|
+
* Get height for a specific row (variable row heights).
|
|
46
|
+
* Returns undefined if using default height.
|
|
47
|
+
*/
|
|
48
|
+
getRowHeight(row: Row, rowIndex: number): number | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Check if a row should be rendered as full-width.
|
|
51
|
+
*/
|
|
52
|
+
isFullWidthRow(row: Row): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Render full-width row content.
|
|
55
|
+
*/
|
|
56
|
+
renderFullWidthRow(row: Row): string | HTMLElement;
|
|
57
|
+
/**
|
|
58
|
+
* Generate the row number column definition.
|
|
59
|
+
*/
|
|
60
|
+
getRowNumberColumn(): ColumnDef;
|
|
61
|
+
/**
|
|
62
|
+
* Convert inline style object to CSS string.
|
|
63
|
+
*/
|
|
64
|
+
styleToString(style: Record<string, string>): string;
|
|
65
|
+
/**
|
|
66
|
+
* Compute cumulative row offsets for variable row heights.
|
|
67
|
+
* Returns array of top positions for each row.
|
|
68
|
+
*/
|
|
69
|
+
computeRowOffsets(rows: Row[], defaultHeight: number): {
|
|
70
|
+
offsets: number[];
|
|
71
|
+
totalHeight: number;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=row-styling.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-styling.d.ts","sourceRoot":"","sources":["../../../src/core/row-styling.ts"],"names":[],"mappings":"AAAA;;;G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CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAK/D;;;OAGG;IACH,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAK5D;;OAEG;IACH,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO;IAKjC;;OAEG;IACH,kBAAkB,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,WAAW;IAKlD;;OAEG;IACH,kBAAkB,IAAI,SAAS;IAiB/B;;OAEG;IACH,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM;IASpD;;;OAGG;IACH,iBAAiB,CACf,IAAI,EAAE,GAAG,EAAE,EACX,aAAa,EAAE,MAAM,GACpB;QAAE,OAAO,EAAE,MAAM,EAAE,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE;CAY9C"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Selection state manager.
|
|
3
|
+
*
|
|
4
|
+
* Handles row selection modes (none, single, multiple), checkbox column,
|
|
5
|
+
* Shift+click range selection, and select-all. Selection persists across
|
|
6
|
+
* sort and filter operations by tracking row keys.
|
|
7
|
+
*/
|
|
8
|
+
import type { Row } from '../types.js';
|
|
9
|
+
export type SelectionMode = 'none' | 'single' | 'multiple';
|
|
10
|
+
export declare class SelectionManager {
|
|
11
|
+
#private;
|
|
12
|
+
constructor(rowKey?: string);
|
|
13
|
+
get mode(): SelectionMode;
|
|
14
|
+
set mode(value: SelectionMode);
|
|
15
|
+
get rowKey(): string;
|
|
16
|
+
set rowKey(value: string);
|
|
17
|
+
get selectedKeys(): ReadonlySet<unknown>;
|
|
18
|
+
get selectedCount(): number;
|
|
19
|
+
/**
|
|
20
|
+
* Get selected rows from the dataset.
|
|
21
|
+
*/
|
|
22
|
+
getSelectedRows(rows: Row[]): Row[];
|
|
23
|
+
/**
|
|
24
|
+
* Check if a row is selected.
|
|
25
|
+
*/
|
|
26
|
+
isSelected(row: Row): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Handle a row click event. Returns the change details.
|
|
29
|
+
*/
|
|
30
|
+
handleClick(row: Row, rowIndex: number, rows: Row[], shiftKey: boolean, ctrlKey: boolean): {
|
|
31
|
+
added: Row[];
|
|
32
|
+
removed: Row[];
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Toggle a specific row's selection.
|
|
36
|
+
*/
|
|
37
|
+
toggle(row: Row): {
|
|
38
|
+
added: Row[];
|
|
39
|
+
removed: Row[];
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Select all rows.
|
|
43
|
+
*/
|
|
44
|
+
selectAll(rows: Row[]): {
|
|
45
|
+
added: Row[];
|
|
46
|
+
removed: Row[];
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Deselect all rows.
|
|
50
|
+
*/
|
|
51
|
+
deselectAll(rows: Row[]): {
|
|
52
|
+
added: Row[];
|
|
53
|
+
removed: Row[];
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Check if all rows are selected.
|
|
57
|
+
*/
|
|
58
|
+
isAllSelected(rows: Row[]): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Check if some (but not all) rows are selected.
|
|
61
|
+
*/
|
|
62
|
+
isIndeterminate(rows: Row[]): boolean;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=selection-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection-manager.d.ts","sourceRoot":"","sources":["../../../src/core/selection-manager.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE3D,qBAAa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24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client-side sort engine.
|
|
3
|
+
*
|
|
4
|
+
* Supports single and multi-column sorting with locale-aware string
|
|
5
|
+
* comparison, numeric sorting, date sorting, and custom comparators.
|
|
6
|
+
*/
|
|
7
|
+
import type { Row, SortItem, ColumnDef } from '../types.js';
|
|
8
|
+
export declare class SortEngine {
|
|
9
|
+
#private;
|
|
10
|
+
/**
|
|
11
|
+
* Sort an array of rows according to the sort model.
|
|
12
|
+
* Returns a new sorted array (does not mutate the input).
|
|
13
|
+
*/
|
|
14
|
+
sort(rows: Row[], sortModel: SortItem[], columns: ColumnDef[]): Row[];
|
|
15
|
+
/**
|
|
16
|
+
* Advance sort direction through the cycle: null → asc → desc → null
|
|
17
|
+
*/
|
|
18
|
+
nextSortDirection(current: 'asc' | 'desc' | null): 'asc' | 'desc' | null;
|
|
19
|
+
/**
|
|
20
|
+
* Update a sort model for single-column sort (replaces existing).
|
|
21
|
+
*/
|
|
22
|
+
updateSortModel(current: SortItem[], field: string, multiSort: boolean): SortItem[];
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=sort-engine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sort-engine.d.ts","sourceRoot":"","sources":["../../../src/core/sort-engine.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE5D,qBAAa,UAAU;;IAGrB;;;OAGG;IACH,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,GAAG,EAAE;IAkBrE;;OAEG;IACH,iBAAiB,CAAC,OAAO,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,GAAG,IAAI;IAMxE;;OAEG;IACH,eAAe,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,QAAQ,EAAE;CAoDpF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sparkline renderer — mini inline charts for grid cells.
|
|
3
|
+
*
|
|
4
|
+
* Supports line, bar, and area chart types. Renders as inline SVG
|
|
5
|
+
* for crisp, resolution-independent display.
|
|
6
|
+
*/
|
|
7
|
+
export interface SparklineDef {
|
|
8
|
+
type: 'line' | 'bar' | 'area';
|
|
9
|
+
fill?: string;
|
|
10
|
+
stroke?: string;
|
|
11
|
+
strokeWidth?: number;
|
|
12
|
+
highlightStyle?: {
|
|
13
|
+
fill?: string;
|
|
14
|
+
stroke?: string;
|
|
15
|
+
};
|
|
16
|
+
min?: number;
|
|
17
|
+
max?: number;
|
|
18
|
+
padding?: {
|
|
19
|
+
top?: number;
|
|
20
|
+
right?: number;
|
|
21
|
+
bottom?: number;
|
|
22
|
+
left?: number;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export interface SparklineOptions {
|
|
26
|
+
width?: number;
|
|
27
|
+
height?: number;
|
|
28
|
+
data: number[];
|
|
29
|
+
def: SparklineDef;
|
|
30
|
+
}
|
|
31
|
+
export declare class Sparkline {
|
|
32
|
+
#private;
|
|
33
|
+
/**
|
|
34
|
+
* Render a sparkline as an inline SVG string.
|
|
35
|
+
*/
|
|
36
|
+
render(options: SparklineOptions): string;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=sparkline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sparkline.d.ts","sourceRoot":"","sources":["../../../src/core/sparkline.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACpD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5E;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,EAAE,YAAY,CAAC;CACnB;AAID,qBAAa,SAAS;;IACpB;;OAEG;IACH,MAAM,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM;CAkJ1C"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Status bar engine — bottom bar showing grid statistics.
|
|
3
|
+
*
|
|
4
|
+
* Provides built-in panels (total rows, filtered rows, selected rows)
|
|
5
|
+
* and aggregation panel for selected cell ranges.
|
|
6
|
+
*/
|
|
7
|
+
export interface StatusBarPanel {
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
value: string | number;
|
|
11
|
+
position: 'left' | 'center' | 'right';
|
|
12
|
+
}
|
|
13
|
+
export interface StatusBarConfig {
|
|
14
|
+
enabled?: boolean;
|
|
15
|
+
panels?: StatusBarPanel[];
|
|
16
|
+
showTotalRows?: boolean;
|
|
17
|
+
showFilteredRows?: boolean;
|
|
18
|
+
showSelectedRows?: boolean;
|
|
19
|
+
showAggregation?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface StatusBarState {
|
|
22
|
+
panels: StatusBarPanel[];
|
|
23
|
+
}
|
|
24
|
+
export declare class StatusBar {
|
|
25
|
+
#private;
|
|
26
|
+
get enabled(): boolean;
|
|
27
|
+
set enabled(value: boolean);
|
|
28
|
+
configure(config: StatusBarConfig): void;
|
|
29
|
+
/**
|
|
30
|
+
* Build status bar panels from current grid state.
|
|
31
|
+
*/
|
|
32
|
+
buildPanels(stats: {
|
|
33
|
+
totalRows: number;
|
|
34
|
+
filteredRows: number;
|
|
35
|
+
selectedRows: number;
|
|
36
|
+
aggregation?: {
|
|
37
|
+
sum: number;
|
|
38
|
+
count: number;
|
|
39
|
+
avg: number;
|
|
40
|
+
min: number;
|
|
41
|
+
max: number;
|
|
42
|
+
};
|
|
43
|
+
}): StatusBarPanel[];
|
|
44
|
+
/**
|
|
45
|
+
* Render the status bar as HTML.
|
|
46
|
+
*/
|
|
47
|
+
render(panels: StatusBarPanel[]): string;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=status-bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-bar.d.ts","sourceRoot":"","sources":["../../../src/core/status-bar.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CACvC;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,cAAc,EAAE,CAAC;CAC1B;AAID,qBAAa,SAAS;;IAQpB,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,IAAI,OAAO,CAAC,KAAK,EAAE,OAAO,EAEzB;IAED,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI;IASxC;;OAEG;IACH,WAAW,CAAC,KAAK,EAAE;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,YAAY,EAAE,MAAM,CAAC;QACrB,YAAY,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAA;SAAE,CAAC;KACrF,GAAG,cAAc,EAAE;IA8CpB;;OAEG;IACH,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM;CAyBzC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transaction manager for the data grid.
|
|
3
|
+
*
|
|
4
|
+
* Supports add/update/remove operations on the dataset without
|
|
5
|
+
* replacing the entire array. Maintains a transaction log for
|
|
6
|
+
* audit/undo purposes.
|
|
7
|
+
*/
|
|
8
|
+
import type { Row } from '../types.js';
|
|
9
|
+
export interface RowTransaction {
|
|
10
|
+
add?: Row[];
|
|
11
|
+
addIndex?: number;
|
|
12
|
+
update?: Row[];
|
|
13
|
+
remove?: Row[];
|
|
14
|
+
}
|
|
15
|
+
export interface TransactionResult {
|
|
16
|
+
add: Row[];
|
|
17
|
+
update: Array<{
|
|
18
|
+
oldRow: Row;
|
|
19
|
+
newRow: Row;
|
|
20
|
+
}>;
|
|
21
|
+
remove: Row[];
|
|
22
|
+
}
|
|
23
|
+
export interface TransactionLogEntry {
|
|
24
|
+
timestamp: number;
|
|
25
|
+
transaction: RowTransaction;
|
|
26
|
+
result: TransactionResult;
|
|
27
|
+
}
|
|
28
|
+
export declare class TransactionManager {
|
|
29
|
+
#private;
|
|
30
|
+
constructor(options?: {
|
|
31
|
+
rowKey?: string;
|
|
32
|
+
maxLogSize?: number;
|
|
33
|
+
});
|
|
34
|
+
get rowKey(): string;
|
|
35
|
+
set rowKey(key: string);
|
|
36
|
+
get logSize(): number;
|
|
37
|
+
get log(): TransactionLogEntry[];
|
|
38
|
+
apply(rows: Row[], tx: RowTransaction): {
|
|
39
|
+
rows: Row[];
|
|
40
|
+
result: TransactionResult;
|
|
41
|
+
};
|
|
42
|
+
applyBatch(rows: Row[], transactions: RowTransaction[]): {
|
|
43
|
+
rows: Row[];
|
|
44
|
+
results: TransactionResult[];
|
|
45
|
+
};
|
|
46
|
+
buildUndoTransaction(): RowTransaction | null;
|
|
47
|
+
validate(rows: Row[], tx: RowTransaction): string[];
|
|
48
|
+
clearLog(): void;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=transaction.d.ts.map
|