@toolbox-web/grid 0.1.0 → 0.2.1
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/README.md +1 -1
- package/all.d.ts +13 -0
- package/all.js +1684 -1196
- package/all.js.map +1 -1
- package/index.d.ts +4 -163
- package/index.js +1278 -1702
- package/index.js.map +1 -1
- package/lib/plugins/clipboard/index.js.map +1 -1
- package/lib/plugins/column-virtualization/index.js.map +1 -1
- package/lib/plugins/context-menu/index.js +35 -78
- package/lib/plugins/context-menu/index.js.map +1 -1
- package/lib/plugins/export/index.js.map +1 -1
- package/lib/plugins/filtering/index.js.map +1 -1
- package/lib/plugins/grouping-columns/index.js.map +1 -1
- package/lib/plugins/grouping-rows/index.js.map +1 -1
- package/lib/plugins/master-detail/index.js +1 -1
- package/lib/plugins/master-detail/index.js.map +1 -1
- package/lib/plugins/multi-sort/index.js.map +1 -1
- package/lib/plugins/pinned-columns/index.js.map +1 -1
- package/lib/plugins/pinned-rows/index.js +8 -8
- package/lib/plugins/pinned-rows/index.js.map +1 -1
- package/lib/plugins/pivot/index.js +160 -160
- package/lib/plugins/pivot/index.js.map +1 -1
- package/lib/plugins/reorder/index.js.map +1 -1
- package/lib/plugins/selection/index.js +93 -72
- package/lib/plugins/selection/index.js.map +1 -1
- package/lib/plugins/server-side/index.js.map +1 -1
- package/lib/plugins/tree/index.js.map +1 -1
- package/lib/plugins/undo-redo/index.js.map +1 -1
- package/lib/plugins/visibility/index.js.map +1 -1
- package/package.json +1 -1
- package/umd/grid.all.umd.js +27 -78
- package/umd/grid.all.umd.js.map +1 -1
- package/umd/grid.umd.js +28 -28
- package/umd/grid.umd.js.map +1 -1
- package/umd/plugins/context-menu.umd.js +1 -52
- package/umd/plugins/context-menu.umd.js.map +1 -1
- package/umd/plugins/master-detail.umd.js +1 -1
- package/umd/plugins/master-detail.umd.js.map +1 -1
- package/umd/plugins/pinned-rows.umd.js +1 -1
- package/umd/plugins/pinned-rows.umd.js.map +1 -1
- package/umd/plugins/pivot.umd.js +1 -1
- package/umd/plugins/pivot.umd.js.map +1 -1
- package/umd/plugins/selection.umd.js +1 -1
- package/umd/plugins/selection.umd.js.map +1 -1
- package/custom-elements.json +0 -1934
package/index.d.ts
CHANGED
|
@@ -1427,22 +1427,6 @@ export declare const FitModeEnum: {
|
|
|
1427
1427
|
readonly FIXED: "fixed";
|
|
1428
1428
|
};
|
|
1429
1429
|
|
|
1430
|
-
/** A flattened tree row with hierarchy metadata */
|
|
1431
|
-
declare interface FlattenedTreeRow {
|
|
1432
|
-
/** Unique key identifying this row */
|
|
1433
|
-
key: string;
|
|
1434
|
-
/** Original row data */
|
|
1435
|
-
data: any;
|
|
1436
|
-
/** Depth level in the tree (0 = root) */
|
|
1437
|
-
depth: number;
|
|
1438
|
-
/** Whether this row has children */
|
|
1439
|
-
hasChildren: boolean;
|
|
1440
|
-
/** Whether this row is currently expanded */
|
|
1441
|
-
isExpanded: boolean;
|
|
1442
|
-
/** Key of the parent row, or null for root level */
|
|
1443
|
-
parentKey: string | null;
|
|
1444
|
-
}
|
|
1445
|
-
|
|
1446
1430
|
export declare const getAggregator: (ref: AggregatorRef_2 | undefined) => AggregatorFn | undefined;
|
|
1447
1431
|
|
|
1448
1432
|
export declare interface GetRowsParams {
|
|
@@ -1636,6 +1620,10 @@ export declare interface GridElement {
|
|
|
1636
1620
|
rows: any[];
|
|
1637
1621
|
columns: ColumnConfig[];
|
|
1638
1622
|
gridConfig: any;
|
|
1623
|
+
/** Current focused row index */
|
|
1624
|
+
focusRow: number;
|
|
1625
|
+
/** Current focused column index */
|
|
1626
|
+
focusCol: number;
|
|
1639
1627
|
/** AbortSignal that is aborted when the grid disconnects from the DOM */
|
|
1640
1628
|
disconnectSignal: AbortSignal;
|
|
1641
1629
|
requestRender(): void;
|
|
@@ -2272,79 +2260,6 @@ export declare interface SelectionConfig {
|
|
|
2272
2260
|
declare type SelectionMode_2 = 'cell' | 'row' | 'range';
|
|
2273
2261
|
export { SelectionMode_2 as SelectionMode }
|
|
2274
2262
|
|
|
2275
|
-
/**
|
|
2276
|
-
* Selection Plugin for tbw-grid
|
|
2277
|
-
*
|
|
2278
|
-
* @example
|
|
2279
|
-
* ```ts
|
|
2280
|
-
* new SelectionPlugin({ mode: 'range' })
|
|
2281
|
-
* ```
|
|
2282
|
-
*/
|
|
2283
|
-
export declare class SelectionPlugin extends BaseGridPlugin<SelectionConfig> {
|
|
2284
|
-
#private;
|
|
2285
|
-
readonly name = "selection";
|
|
2286
|
-
readonly version = "1.0.0";
|
|
2287
|
-
protected get defaultConfig(): Partial<SelectionConfig>;
|
|
2288
|
-
/** Row selection state (row mode) */
|
|
2289
|
-
private selected;
|
|
2290
|
-
private lastSelected;
|
|
2291
|
-
private anchor;
|
|
2292
|
-
/** Range selection state (range mode) */
|
|
2293
|
-
private ranges;
|
|
2294
|
-
private activeRange;
|
|
2295
|
-
private cellAnchor;
|
|
2296
|
-
private isDragging;
|
|
2297
|
-
/** Cell selection state (cell mode) */
|
|
2298
|
-
private selectedCell;
|
|
2299
|
-
detach(): void;
|
|
2300
|
-
onCellClick(event: CellClickEvent): boolean;
|
|
2301
|
-
onKeyDown(event: KeyboardEvent): boolean;
|
|
2302
|
-
onCellMouseDown(event: CellMouseEvent): boolean | void;
|
|
2303
|
-
onCellMouseMove(event: CellMouseEvent): boolean | void;
|
|
2304
|
-
onCellMouseUp(_event: CellMouseEvent): boolean | void;
|
|
2305
|
-
afterRender(): void;
|
|
2306
|
-
/**
|
|
2307
|
-
* Called after scroll-triggered row rendering.
|
|
2308
|
-
* Reapplies selection classes to recycled DOM elements.
|
|
2309
|
-
*/
|
|
2310
|
-
onScrollRender(): void;
|
|
2311
|
-
/**
|
|
2312
|
-
* Get the selected cell (cell mode only).
|
|
2313
|
-
*/
|
|
2314
|
-
getSelectedCell(): {
|
|
2315
|
-
row: number;
|
|
2316
|
-
col: number;
|
|
2317
|
-
} | null;
|
|
2318
|
-
/**
|
|
2319
|
-
* Get all selected row indices (row mode).
|
|
2320
|
-
*/
|
|
2321
|
-
getSelectedRows(): number[];
|
|
2322
|
-
/**
|
|
2323
|
-
* Get all selected cell ranges in public format.
|
|
2324
|
-
*/
|
|
2325
|
-
getRanges(): CellRange[];
|
|
2326
|
-
/**
|
|
2327
|
-
* Get all selected cells across all ranges.
|
|
2328
|
-
*/
|
|
2329
|
-
getSelectedCells(): Array<{
|
|
2330
|
-
row: number;
|
|
2331
|
-
col: number;
|
|
2332
|
-
}>;
|
|
2333
|
-
/**
|
|
2334
|
-
* Check if a specific cell is in range selection.
|
|
2335
|
-
*/
|
|
2336
|
-
isCellSelected(row: number, col: number): boolean;
|
|
2337
|
-
/**
|
|
2338
|
-
* Clear all selection.
|
|
2339
|
-
*/
|
|
2340
|
-
clearSelection(): void;
|
|
2341
|
-
/**
|
|
2342
|
-
* Set selected ranges programmatically.
|
|
2343
|
-
*/
|
|
2344
|
-
setRanges(ranges: CellRange[]): void;
|
|
2345
|
-
readonly styles: string;
|
|
2346
|
-
}
|
|
2347
|
-
|
|
2348
2263
|
export declare interface ServerSideDataSource {
|
|
2349
2264
|
getRows(params: GetRowsParams): Promise<GetRowsResult>;
|
|
2350
2265
|
}
|
|
@@ -2501,80 +2416,6 @@ export declare interface TreeExpandDetail {
|
|
|
2501
2416
|
depth: number;
|
|
2502
2417
|
}
|
|
2503
2418
|
|
|
2504
|
-
/**
|
|
2505
|
-
* Tree Data Plugin for tbw-grid
|
|
2506
|
-
*
|
|
2507
|
-
* Provides hierarchical tree data display with expand/collapse functionality.
|
|
2508
|
-
*
|
|
2509
|
-
* @example
|
|
2510
|
-
* ```ts
|
|
2511
|
-
* new TreePlugin({ defaultExpanded: true, indentWidth: 24 })
|
|
2512
|
-
* ```
|
|
2513
|
-
*/
|
|
2514
|
-
export declare class TreePlugin extends BaseGridPlugin<TreeConfig> {
|
|
2515
|
-
readonly name = "tree";
|
|
2516
|
-
readonly version = "1.0.0";
|
|
2517
|
-
protected get defaultConfig(): Partial<TreeConfig>;
|
|
2518
|
-
/** Set of expanded row keys */
|
|
2519
|
-
private expandedKeys;
|
|
2520
|
-
/** Whether initial expansion (based on defaultExpanded config) has been applied */
|
|
2521
|
-
private initialExpansionDone;
|
|
2522
|
-
/** Flattened tree rows for rendering */
|
|
2523
|
-
private flattenedRows;
|
|
2524
|
-
/** Map from key to flattened row for quick lookup */
|
|
2525
|
-
private rowKeyMap;
|
|
2526
|
-
detach(): void;
|
|
2527
|
-
/**
|
|
2528
|
-
* Detects if tree functionality should be enabled based on data structure.
|
|
2529
|
-
* Called by the grid during plugin initialization.
|
|
2530
|
-
*/
|
|
2531
|
-
detect(rows: readonly unknown[]): boolean;
|
|
2532
|
-
processRows(rows: readonly unknown[]): any[];
|
|
2533
|
-
processColumns(columns: readonly ColumnConfig[]): ColumnConfig[];
|
|
2534
|
-
onCellClick(event: CellClickEvent): boolean;
|
|
2535
|
-
/**
|
|
2536
|
-
* Expand a specific node by key.
|
|
2537
|
-
*/
|
|
2538
|
-
expand(key: string): void;
|
|
2539
|
-
/**
|
|
2540
|
-
* Collapse a specific node by key.
|
|
2541
|
-
*/
|
|
2542
|
-
collapse(key: string): void;
|
|
2543
|
-
/**
|
|
2544
|
-
* Toggle the expansion state of a node.
|
|
2545
|
-
*/
|
|
2546
|
-
toggle(key: string): void;
|
|
2547
|
-
/**
|
|
2548
|
-
* Expand all nodes in the tree.
|
|
2549
|
-
*/
|
|
2550
|
-
expandAll(): void;
|
|
2551
|
-
/**
|
|
2552
|
-
* Collapse all nodes in the tree.
|
|
2553
|
-
*/
|
|
2554
|
-
collapseAll(): void;
|
|
2555
|
-
/**
|
|
2556
|
-
* Check if a node is currently expanded.
|
|
2557
|
-
*/
|
|
2558
|
-
isExpanded(key: string): boolean;
|
|
2559
|
-
/**
|
|
2560
|
-
* Get all currently expanded keys.
|
|
2561
|
-
*/
|
|
2562
|
-
getExpandedKeys(): string[];
|
|
2563
|
-
/**
|
|
2564
|
-
* Get the flattened tree rows with metadata.
|
|
2565
|
-
*/
|
|
2566
|
-
getFlattenedRows(): FlattenedTreeRow[];
|
|
2567
|
-
/**
|
|
2568
|
-
* Get a row's original data by its key.
|
|
2569
|
-
*/
|
|
2570
|
-
getRowByKey(key: string): any | undefined;
|
|
2571
|
-
/**
|
|
2572
|
-
* Expand all ancestors of a node to make it visible.
|
|
2573
|
-
*/
|
|
2574
|
-
expandToKey(key: string): void;
|
|
2575
|
-
readonly styles: string;
|
|
2576
|
-
}
|
|
2577
|
-
|
|
2578
2419
|
export declare const unregisterAggregator: (name: string) => void;
|
|
2579
2420
|
|
|
2580
2421
|
export declare type ValueAggregatorFn = (values: number[]) => number;
|