@toolbox-web/grid 0.0.7 → 0.1.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/all.d.ts +151 -95
- package/all.js +1554 -1452
- package/all.js.map +1 -1
- package/custom-elements.json +89 -7
- package/index.d.ts +68 -23
- package/index.js +1066 -948
- package/index.js.map +1 -1
- package/lib/plugins/clipboard/index.js +48 -49
- package/lib/plugins/clipboard/index.js.map +1 -1
- package/lib/plugins/column-virtualization/index.js +6 -6
- package/lib/plugins/column-virtualization/index.js.map +1 -1
- package/lib/plugins/context-menu/index.js +32 -34
- package/lib/plugins/context-menu/index.js.map +1 -1
- package/lib/plugins/export/index.js +7 -7
- package/lib/plugins/export/index.js.map +1 -1
- package/lib/plugins/filtering/index.js +5 -38
- package/lib/plugins/filtering/index.js.map +1 -1
- package/lib/plugins/grouping-columns/index.js +4 -32
- package/lib/plugins/grouping-columns/index.js.map +1 -1
- package/lib/plugins/grouping-rows/index.js +8 -45
- package/lib/plugins/grouping-rows/index.js.map +1 -1
- package/lib/plugins/master-detail/index.js +6 -30
- package/lib/plugins/master-detail/index.js.map +1 -1
- package/lib/plugins/multi-sort/index.js +19 -42
- package/lib/plugins/multi-sort/index.js.map +1 -1
- package/lib/plugins/pinned-columns/index.js +5 -6
- package/lib/plugins/pinned-columns/index.js.map +1 -1
- package/lib/plugins/pinned-rows/index.js +6 -80
- package/lib/plugins/pinned-rows/index.js.map +1 -1
- package/lib/plugins/pivot/index.js +673 -145
- package/lib/plugins/pivot/index.js.map +1 -1
- package/lib/plugins/reorder/index.js +22 -51
- package/lib/plugins/reorder/index.js.map +1 -1
- package/lib/plugins/selection/index.js +53 -83
- package/lib/plugins/selection/index.js.map +1 -1
- package/lib/plugins/server-side/index.js +2 -2
- package/lib/plugins/server-side/index.js.map +1 -1
- package/lib/plugins/tree/index.js +6 -14
- package/lib/plugins/tree/index.js.map +1 -1
- package/lib/plugins/undo-redo/index.js +2 -3
- package/lib/plugins/undo-redo/index.js.map +1 -1
- package/lib/plugins/visibility/index.js +13 -105
- package/lib/plugins/visibility/index.js.map +1 -1
- package/package.json +1 -1
- package/themes/dg-theme-bootstrap.css +73 -0
- package/themes/dg-theme-material.css +71 -0
- package/umd/grid.all.umd.js +40 -415
- package/umd/grid.all.umd.js.map +1 -1
- package/umd/grid.umd.js +29 -60
- package/umd/grid.umd.js.map +1 -1
- package/umd/plugins/clipboard.umd.js +4 -4
- package/umd/plugins/clipboard.umd.js.map +1 -1
- package/umd/plugins/column-virtualization.umd.js +1 -1
- package/umd/plugins/column-virtualization.umd.js.map +1 -1
- package/umd/plugins/context-menu.umd.js +2 -2
- package/umd/plugins/context-menu.umd.js.map +1 -1
- package/umd/plugins/export.umd.js +1 -1
- package/umd/plugins/export.umd.js.map +1 -1
- package/umd/plugins/filtering.umd.js +2 -34
- package/umd/plugins/filtering.umd.js.map +1 -1
- package/umd/plugins/grouping-columns.umd.js +1 -28
- package/umd/plugins/grouping-columns.umd.js.map +1 -1
- package/umd/plugins/grouping-rows.umd.js +1 -39
- package/umd/plugins/grouping-rows.umd.js.map +1 -1
- package/umd/plugins/master-detail.umd.js +1 -26
- package/umd/plugins/master-detail.umd.js.map +1 -1
- package/umd/plugins/multi-sort.umd.js +1 -25
- package/umd/plugins/multi-sort.umd.js.map +1 -1
- package/umd/plugins/pinned-columns.umd.js +1 -1
- package/umd/plugins/pinned-columns.umd.js.map +1 -1
- package/umd/plugins/pinned-rows.umd.js +1 -72
- package/umd/plugins/pinned-rows.umd.js.map +1 -1
- package/umd/plugins/pivot.umd.js +1 -7
- package/umd/plugins/pivot.umd.js.map +1 -1
- package/umd/plugins/reorder.umd.js +1 -30
- package/umd/plugins/reorder.umd.js.map +1 -1
- package/umd/plugins/selection.umd.js +1 -33
- package/umd/plugins/selection.umd.js.map +1 -1
- package/umd/plugins/server-side.umd.js +1 -1
- package/umd/plugins/server-side.umd.js.map +1 -1
- package/umd/plugins/tree.umd.js +1 -10
- package/umd/plugins/tree.umd.js.map +1 -1
- package/umd/plugins/undo-redo.umd.js +1 -1
- package/umd/plugins/undo-redo.umd.js.map +1 -1
- package/umd/plugins/visibility.umd.js +1 -93
- package/umd/plugins/visibility.umd.js.map +1 -1
package/all.d.ts
CHANGED
|
@@ -6,6 +6,12 @@ export declare interface ActivateCellDetail {
|
|
|
6
6
|
col: number;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
/** Available aggregation function types */
|
|
10
|
+
declare type AggFunc = 'sum' | 'avg' | 'count' | 'min' | 'max' | 'first' | 'last';
|
|
11
|
+
|
|
12
|
+
/** Available aggregation function types */
|
|
13
|
+
declare type AggFunc_2 = 'sum' | 'avg' | 'count' | 'min' | 'max' | 'first' | 'last';
|
|
14
|
+
|
|
9
15
|
/**
|
|
10
16
|
* Configuration for an aggregation row (footer/header row with computed values).
|
|
11
17
|
* Replaces the core FooterRowConfig functionality.
|
|
@@ -1494,8 +1500,6 @@ export declare interface ChangedRowsResetDetail<TRow = any> {
|
|
|
1494
1500
|
*/
|
|
1495
1501
|
/** Configuration options for the clipboard plugin */
|
|
1496
1502
|
declare interface ClipboardConfig {
|
|
1497
|
-
/** Whether clipboard functionality is enabled (default: true) */
|
|
1498
|
-
enabled?: boolean;
|
|
1499
1503
|
/** Include column headers in copied text (default: false) */
|
|
1500
1504
|
includeHeaders?: boolean;
|
|
1501
1505
|
/** Column delimiter character (default: '\t' for tab) */
|
|
@@ -1751,8 +1755,6 @@ declare type ColumnViewRenderer_2<TRow = any, TValue = any> = (ctx: CellRenderCo
|
|
|
1751
1755
|
*/
|
|
1752
1756
|
/** Configuration options for the column virtualization plugin */
|
|
1753
1757
|
declare interface ColumnVirtualizationConfig {
|
|
1754
|
-
/** Whether the plugin is enabled (default: true) */
|
|
1755
|
-
enabled?: boolean;
|
|
1756
1758
|
/** Auto-enable when column count exceeds threshold (default: true) */
|
|
1757
1759
|
autoEnable?: boolean;
|
|
1758
1760
|
/** Column count threshold for auto-enabling (default: 30) */
|
|
@@ -1816,8 +1818,6 @@ export declare class ColumnVirtualizationPlugin extends BaseGridPlugin_2<ColumnV
|
|
|
1816
1818
|
* Configuration options for the context menu plugin.
|
|
1817
1819
|
*/
|
|
1818
1820
|
declare interface ContextMenuConfig {
|
|
1819
|
-
/** Whether the context menu is enabled (default: true) */
|
|
1820
|
-
enabled?: boolean;
|
|
1821
1821
|
/** Menu items - static array or function returning items */
|
|
1822
1822
|
items?: ContextMenuItem_3[] | ((params: ContextMenuParams_3) => ContextMenuItem_3[]);
|
|
1823
1823
|
}
|
|
@@ -2207,23 +2207,37 @@ export declare class DataGridElement<T = any> extends HTMLElement implements Int
|
|
|
2207
2207
|
* Clears all user modifications (order, width, visibility, sort).
|
|
2208
2208
|
*/
|
|
2209
2209
|
resetColumnState(): void;
|
|
2210
|
+
/**
|
|
2211
|
+
* Check if the tool panel is currently open.
|
|
2212
|
+
*/
|
|
2213
|
+
get isToolPanelOpen(): boolean;
|
|
2210
2214
|
/**
|
|
2211
2215
|
* Get the currently active tool panel ID, or null if none is open.
|
|
2216
|
+
* @deprecated Use isToolPanelOpen and expandedToolPanelSections instead.
|
|
2212
2217
|
*/
|
|
2213
2218
|
get activeToolPanel(): string | null;
|
|
2214
2219
|
/**
|
|
2215
|
-
*
|
|
2216
|
-
* Closes any currently open panel first.
|
|
2220
|
+
* Get the IDs of expanded accordion sections.
|
|
2217
2221
|
*/
|
|
2218
|
-
|
|
2222
|
+
get expandedToolPanelSections(): string[];
|
|
2219
2223
|
/**
|
|
2220
|
-
*
|
|
2224
|
+
* Open the tool panel (accordion view with all registered panels).
|
|
2225
|
+
*/
|
|
2226
|
+
openToolPanel(): void;
|
|
2227
|
+
/**
|
|
2228
|
+
* Close the tool panel.
|
|
2221
2229
|
*/
|
|
2222
2230
|
closeToolPanel(): void;
|
|
2223
2231
|
/**
|
|
2224
|
-
* Toggle
|
|
2232
|
+
* Toggle the tool panel open/closed.
|
|
2225
2233
|
*/
|
|
2226
|
-
toggleToolPanel(
|
|
2234
|
+
toggleToolPanel(): void;
|
|
2235
|
+
/**
|
|
2236
|
+
* Toggle an accordion section expanded/collapsed.
|
|
2237
|
+
* Only one section can be expanded at a time (exclusive accordion).
|
|
2238
|
+
* When there's only one panel, toggling is disabled (always expanded).
|
|
2239
|
+
*/
|
|
2240
|
+
toggleToolPanelSection(sectionId: string): void;
|
|
2227
2241
|
/**
|
|
2228
2242
|
* Get registered tool panel definitions.
|
|
2229
2243
|
*/
|
|
@@ -2364,8 +2378,6 @@ declare interface EditorExecContext<T = any> extends CellContext<T> {
|
|
|
2364
2378
|
|
|
2365
2379
|
/** Configuration options for the export plugin */
|
|
2366
2380
|
declare interface ExportConfig {
|
|
2367
|
-
/** Whether export is enabled (default: true) */
|
|
2368
|
-
enabled?: boolean;
|
|
2369
2381
|
/** Default file name for exports (default: 'export') */
|
|
2370
2382
|
fileName?: string;
|
|
2371
2383
|
/** Include column headers in export (default: true) */
|
|
@@ -2505,8 +2517,6 @@ export declare interface ExternalMountViewDetail<TRow = any> {
|
|
|
2505
2517
|
|
|
2506
2518
|
/** Configuration options for the filtering plugin */
|
|
2507
2519
|
export declare interface FilterConfig {
|
|
2508
|
-
/** Whether filtering is enabled (default: true) */
|
|
2509
|
-
enabled?: boolean;
|
|
2510
2520
|
/** Debounce delay in ms for filter input (default: 300) */
|
|
2511
2521
|
debounceMs?: number;
|
|
2512
2522
|
/** Whether text filtering is case sensitive (default: false) */
|
|
@@ -2521,8 +2531,6 @@ export declare interface FilterConfig {
|
|
|
2521
2531
|
|
|
2522
2532
|
/** Configuration options for the filtering plugin */
|
|
2523
2533
|
declare interface FilterConfig_2 {
|
|
2524
|
-
/** Whether filtering is enabled (default: true) */
|
|
2525
|
-
enabled?: boolean;
|
|
2526
2534
|
/** Debounce delay in ms for filter input (default: 300) */
|
|
2527
2535
|
debounceMs?: number;
|
|
2528
2536
|
/** Whether text filtering is case sensitive (default: false) */
|
|
@@ -2645,7 +2653,7 @@ export declare class FilteringPlugin extends BaseGridPlugin_2<FilterConfig_2> {
|
|
|
2645
2653
|
* Apply filter state from column state.
|
|
2646
2654
|
*/
|
|
2647
2655
|
applyColumnState(field: string, state: ColumnState_2): void;
|
|
2648
|
-
readonly styles
|
|
2656
|
+
readonly styles: string;
|
|
2649
2657
|
}
|
|
2650
2658
|
|
|
2651
2659
|
/** Filter model representing a single filter condition */
|
|
@@ -2795,6 +2803,15 @@ declare interface GetRowsResult_2 {
|
|
|
2795
2803
|
lastRow?: number;
|
|
2796
2804
|
}
|
|
2797
2805
|
|
|
2806
|
+
/**
|
|
2807
|
+
* Get a value-based aggregator function.
|
|
2808
|
+
* Used by Pivot plugin and other features that aggregate pre-extracted values.
|
|
2809
|
+
*
|
|
2810
|
+
* @param aggFunc - Aggregation function name ('sum', 'avg', 'count', 'min', 'max', 'first', 'last')
|
|
2811
|
+
* @returns Aggregator function that takes number[] and returns number
|
|
2812
|
+
*/
|
|
2813
|
+
export declare function getValueAggregator(aggFunc: string): ValueAggregatorFn;
|
|
2814
|
+
|
|
2798
2815
|
/**
|
|
2799
2816
|
* CSS class names used in the grid's shadow DOM.
|
|
2800
2817
|
* Use these when adding/removing classes or querying elements.
|
|
@@ -3005,6 +3022,8 @@ export declare interface GridIcons {
|
|
|
3005
3022
|
submenuArrow?: IconValue;
|
|
3006
3023
|
/** Drag handle icon for reordering. Default: '⋮⋮' */
|
|
3007
3024
|
dragHandle?: IconValue;
|
|
3025
|
+
/** Tool panel toggle icon in toolbar. Default: '☰' */
|
|
3026
|
+
toolPanel?: IconValue;
|
|
3008
3027
|
}
|
|
3009
3028
|
|
|
3010
3029
|
/**
|
|
@@ -3026,6 +3045,8 @@ declare interface GridIcons_2 {
|
|
|
3026
3045
|
submenuArrow?: IconValue_2;
|
|
3027
3046
|
/** Drag handle icon for reordering. Default: '⋮⋮' */
|
|
3028
3047
|
dragHandle?: IconValue_2;
|
|
3048
|
+
/** Tool panel toggle icon in toolbar. Default: '☰' */
|
|
3049
|
+
toolPanel?: IconValue_2;
|
|
3029
3050
|
}
|
|
3030
3051
|
|
|
3031
3052
|
/**
|
|
@@ -3065,8 +3086,6 @@ declare interface GroupHeaderRenderParams {
|
|
|
3065
3086
|
|
|
3066
3087
|
/** Configuration options for the column groups plugin */
|
|
3067
3088
|
declare interface GroupingColumnsConfig {
|
|
3068
|
-
/** Whether the plugin is enabled (default: true) */
|
|
3069
|
-
enabled?: boolean;
|
|
3070
3089
|
/** Custom group header renderer */
|
|
3071
3090
|
groupHeaderRenderer?: (params: GroupHeaderRenderParams) => HTMLElement | string | void;
|
|
3072
3091
|
/** Whether to show group borders (default: true) */
|
|
@@ -3117,13 +3136,11 @@ export declare class GroupingColumnsPlugin extends BaseGridPlugin_2<GroupingColu
|
|
|
3117
3136
|
* Refresh column groups (recompute from current columns).
|
|
3118
3137
|
*/
|
|
3119
3138
|
refresh(): void;
|
|
3120
|
-
readonly styles
|
|
3139
|
+
readonly styles: string;
|
|
3121
3140
|
}
|
|
3122
3141
|
|
|
3123
3142
|
/** Configuration options for the row grouping plugin */
|
|
3124
3143
|
export declare interface GroupingRowsConfig {
|
|
3125
|
-
/** Whether the plugin is enabled (default: true) */
|
|
3126
|
-
enabled?: boolean;
|
|
3127
3144
|
/**
|
|
3128
3145
|
* Callback to determine group path for a row.
|
|
3129
3146
|
* Return an array of group keys, a single key, null/false to skip grouping.
|
|
@@ -3147,8 +3164,6 @@ export declare interface GroupingRowsConfig {
|
|
|
3147
3164
|
|
|
3148
3165
|
/** Configuration options for the row grouping plugin */
|
|
3149
3166
|
declare interface GroupingRowsConfig_2 {
|
|
3150
|
-
/** Whether the plugin is enabled (default: true) */
|
|
3151
|
-
enabled?: boolean;
|
|
3152
3167
|
/**
|
|
3153
3168
|
* Callback to determine group path for a row.
|
|
3154
3169
|
* Return an array of group keys, a single key, null/false to skip grouping.
|
|
@@ -3269,7 +3284,7 @@ export declare class GroupingRowsPlugin extends BaseGridPlugin_2<GroupingRowsCon
|
|
|
3269
3284
|
* @param fn - The groupOn function or undefined to disable
|
|
3270
3285
|
*/
|
|
3271
3286
|
setGroupOn(fn: ((row: any) => any[] | any | null | false) | undefined): void;
|
|
3272
|
-
readonly styles
|
|
3287
|
+
readonly styles: string;
|
|
3273
3288
|
}
|
|
3274
3289
|
|
|
3275
3290
|
/** Group row model item */
|
|
@@ -3467,8 +3482,6 @@ export declare const listAggregators: () => string[];
|
|
|
3467
3482
|
*/
|
|
3468
3483
|
/** Configuration options for the master-detail plugin */
|
|
3469
3484
|
declare interface MasterDetailConfig {
|
|
3470
|
-
/** Whether master-detail functionality is enabled (default: true) */
|
|
3471
|
-
enabled?: boolean;
|
|
3472
3485
|
/** Renderer function that returns detail content for a row */
|
|
3473
3486
|
detailRenderer?: (row: any, rowIndex: number) => HTMLElement | string;
|
|
3474
3487
|
/** Height of the detail row - number (pixels) or 'auto' (default: 'auto') */
|
|
@@ -3565,13 +3578,11 @@ export declare class MasterDetailPlugin extends BaseGridPlugin_2<MasterDetailCon
|
|
|
3565
3578
|
* @returns The detail HTMLElement or undefined
|
|
3566
3579
|
*/
|
|
3567
3580
|
getDetailElement(rowIndex: number): HTMLElement | undefined;
|
|
3568
|
-
readonly styles
|
|
3581
|
+
readonly styles: string;
|
|
3569
3582
|
}
|
|
3570
3583
|
|
|
3571
3584
|
/** Configuration options for the multi-sort plugin */
|
|
3572
3585
|
export declare interface MultiSortConfig {
|
|
3573
|
-
/** Whether multi-sort is enabled (default: true) */
|
|
3574
|
-
enabled?: boolean;
|
|
3575
3586
|
/** Maximum number of columns to sort by (default: 3) */
|
|
3576
3587
|
maxSortColumns?: number;
|
|
3577
3588
|
/** Whether to show sort order badges (1, 2, 3) on headers (default: true) */
|
|
@@ -3580,8 +3591,6 @@ export declare interface MultiSortConfig {
|
|
|
3580
3591
|
|
|
3581
3592
|
/** Configuration options for the multi-sort plugin */
|
|
3582
3593
|
declare interface MultiSortConfig_2 {
|
|
3583
|
-
/** Whether multi-sort is enabled (default: true) */
|
|
3584
|
-
enabled?: boolean;
|
|
3585
3594
|
/** Maximum number of columns to sort by (default: 3) */
|
|
3586
3595
|
maxSortColumns?: number;
|
|
3587
3596
|
/** Whether to show sort order badges (1, 2, 3) on headers (default: true) */
|
|
@@ -3640,7 +3649,7 @@ export declare class MultiSortPlugin extends BaseGridPlugin_2<MultiSortConfig_2>
|
|
|
3640
3649
|
* Rebuilds the sort model from all column states.
|
|
3641
3650
|
*/
|
|
3642
3651
|
applyColumnState(field: string, state: ColumnState_2): void;
|
|
3643
|
-
readonly styles
|
|
3652
|
+
readonly styles: string;
|
|
3644
3653
|
}
|
|
3645
3654
|
|
|
3646
3655
|
/**
|
|
@@ -3650,8 +3659,6 @@ export declare class MultiSortPlugin extends BaseGridPlugin_2<MultiSortConfig_2>
|
|
|
3650
3659
|
*/
|
|
3651
3660
|
/** Configuration options for the pinned columns plugin */
|
|
3652
3661
|
declare interface PinnedColumnsConfig {
|
|
3653
|
-
/** Whether the plugin is enabled (default: true) */
|
|
3654
|
-
enabled?: boolean;
|
|
3655
3662
|
}
|
|
3656
3663
|
|
|
3657
3664
|
/**
|
|
@@ -3698,8 +3705,6 @@ export declare class PinnedColumnsPlugin extends BaseGridPlugin_2<PinnedColumnsC
|
|
|
3698
3705
|
|
|
3699
3706
|
/** Configuration options for the status bar plugin */
|
|
3700
3707
|
declare interface PinnedRowsConfig {
|
|
3701
|
-
/** Whether the status bar is enabled (default: false) */
|
|
3702
|
-
enabled?: boolean;
|
|
3703
3708
|
/** Position of the info bar (default: 'bottom') */
|
|
3704
3709
|
position?: PinnedRowsPosition;
|
|
3705
3710
|
/** Show total row count in info bar (default: true) */
|
|
@@ -3825,28 +3830,38 @@ export declare class PinnedRowsPlugin extends BaseGridPlugin_2<PinnedRowsConfig>
|
|
|
3825
3830
|
* @param id - The aggregation row ID to remove
|
|
3826
3831
|
*/
|
|
3827
3832
|
removeAggregationRow(id: string): void;
|
|
3828
|
-
readonly styles
|
|
3833
|
+
readonly styles: string;
|
|
3829
3834
|
}
|
|
3830
3835
|
|
|
3831
3836
|
/** Position of the status bar relative to the grid */
|
|
3832
3837
|
declare type PinnedRowsPosition = 'top' | 'bottom';
|
|
3833
3838
|
|
|
3834
3839
|
export declare interface PivotConfig {
|
|
3835
|
-
|
|
3840
|
+
/** Whether pivot view is active on load (default: true when fields are configured) */
|
|
3841
|
+
active?: boolean;
|
|
3836
3842
|
rowGroupFields?: string[];
|
|
3837
3843
|
columnGroupFields?: string[];
|
|
3838
3844
|
valueFields?: PivotValueField[];
|
|
3839
3845
|
showTotals?: boolean;
|
|
3840
3846
|
showGrandTotal?: boolean;
|
|
3847
|
+
/** Whether groups are expanded by default (default: true) */
|
|
3848
|
+
defaultExpanded?: boolean;
|
|
3849
|
+
/** Indent width per depth level in pixels (default: 20) */
|
|
3850
|
+
indentWidth?: number;
|
|
3841
3851
|
}
|
|
3842
3852
|
|
|
3843
3853
|
declare interface PivotConfig_2 {
|
|
3844
|
-
|
|
3854
|
+
/** Whether pivot view is active on load (default: true when fields are configured) */
|
|
3855
|
+
active?: boolean;
|
|
3845
3856
|
rowGroupFields?: string[];
|
|
3846
3857
|
columnGroupFields?: string[];
|
|
3847
3858
|
valueFields?: PivotValueField_2[];
|
|
3848
3859
|
showTotals?: boolean;
|
|
3849
3860
|
showGrandTotal?: boolean;
|
|
3861
|
+
/** Whether groups are expanded by default (default: true) */
|
|
3862
|
+
defaultExpanded?: boolean;
|
|
3863
|
+
/** Indent width per depth level in pixels (default: 20) */
|
|
3864
|
+
indentWidth?: number;
|
|
3850
3865
|
}
|
|
3851
3866
|
|
|
3852
3867
|
declare type PivotDataRow = Record<string, unknown>;
|
|
@@ -3866,50 +3881,73 @@ declare type PivotDataRow = Record<string, unknown>;
|
|
|
3866
3881
|
export declare class PivotPlugin extends BaseGridPlugin_2<PivotConfig_2> {
|
|
3867
3882
|
readonly name = "pivot";
|
|
3868
3883
|
readonly version = "1.0.0";
|
|
3884
|
+
/** Tool panel ID for shell integration */
|
|
3885
|
+
static readonly PANEL_ID = "pivot";
|
|
3869
3886
|
protected get defaultConfig(): Partial<PivotConfig_2>;
|
|
3870
3887
|
private isActive;
|
|
3888
|
+
private hasInitialized;
|
|
3871
3889
|
private pivotResult;
|
|
3872
|
-
private
|
|
3873
|
-
private
|
|
3890
|
+
private fieldHeaderMap;
|
|
3891
|
+
private expandedKeys;
|
|
3892
|
+
private defaultExpanded;
|
|
3893
|
+
private originalColumns;
|
|
3894
|
+
private panelContainer;
|
|
3895
|
+
private grandTotalFooter;
|
|
3896
|
+
/**
|
|
3897
|
+
* Check if the plugin has valid pivot configuration (at least value fields).
|
|
3898
|
+
*/
|
|
3899
|
+
private hasValidPivotConfig;
|
|
3874
3900
|
detach(): void;
|
|
3901
|
+
getToolPanel(): ToolPanelDefinition_2 | undefined;
|
|
3875
3902
|
processRows(rows: readonly unknown[]): PivotDataRow[];
|
|
3876
3903
|
processColumns(columns: readonly ColumnConfig_2[]): ColumnConfig_2[];
|
|
3904
|
+
renderRow(row: Record<string, unknown>, rowEl: HTMLElement): boolean;
|
|
3877
3905
|
/**
|
|
3878
|
-
*
|
|
3906
|
+
* Remove pivot-specific classes, attributes, and inline styles from a row element.
|
|
3907
|
+
* Called when pivot mode is disabled to clean up reused DOM elements.
|
|
3908
|
+
* Clears innerHTML so the grid's default renderer can rebuild the row.
|
|
3879
3909
|
*/
|
|
3880
|
-
|
|
3910
|
+
private cleanupPivotStyling;
|
|
3911
|
+
afterRender(): void;
|
|
3881
3912
|
/**
|
|
3882
|
-
*
|
|
3913
|
+
* Render the grand total row as a sticky footer pinned to the bottom.
|
|
3883
3914
|
*/
|
|
3884
|
-
|
|
3915
|
+
private renderGrandTotalFooter;
|
|
3885
3916
|
/**
|
|
3886
|
-
*
|
|
3917
|
+
* Remove the grand total footer element.
|
|
3887
3918
|
*/
|
|
3919
|
+
private cleanupGrandTotalFooter;
|
|
3920
|
+
toggle(key: string): void;
|
|
3921
|
+
expand(key: string): void;
|
|
3922
|
+
collapse(key: string): void;
|
|
3923
|
+
expandAll(): void;
|
|
3924
|
+
collapseAll(): void;
|
|
3925
|
+
isExpanded(key: string): boolean;
|
|
3926
|
+
enablePivot(): void;
|
|
3927
|
+
disablePivot(): void;
|
|
3888
3928
|
isPivotActive(): boolean;
|
|
3889
|
-
/**
|
|
3890
|
-
* Get the current pivot result.
|
|
3891
|
-
*/
|
|
3892
3929
|
getPivotResult(): PivotResult_2 | null;
|
|
3893
|
-
/**
|
|
3894
|
-
* Set the row group fields for pivoting.
|
|
3895
|
-
* @param fields - Array of field names to group rows by
|
|
3896
|
-
*/
|
|
3897
3930
|
setRowGroupFields(fields: string[]): void;
|
|
3898
|
-
/**
|
|
3899
|
-
* Set the column group fields for pivoting.
|
|
3900
|
-
* @param fields - Array of field names to create columns from
|
|
3901
|
-
*/
|
|
3902
3931
|
setColumnGroupFields(fields: string[]): void;
|
|
3903
|
-
/**
|
|
3904
|
-
* Set the value fields with aggregation functions.
|
|
3905
|
-
* @param fields - Array of value field configurations
|
|
3906
|
-
*/
|
|
3907
3932
|
setValueFields(fields: PivotValueField_2[]): void;
|
|
3908
|
-
/**
|
|
3909
|
-
* Refresh the pivot by clearing cached results.
|
|
3910
|
-
*/
|
|
3911
3933
|
refresh(): void;
|
|
3912
|
-
|
|
3934
|
+
showPanel(): void;
|
|
3935
|
+
hidePanel(): void;
|
|
3936
|
+
togglePanel(): void;
|
|
3937
|
+
isPanelVisible(): boolean;
|
|
3938
|
+
private get gridColumns();
|
|
3939
|
+
private buildFieldHeaderMap;
|
|
3940
|
+
private getAvailableFields;
|
|
3941
|
+
private captureOriginalColumns;
|
|
3942
|
+
private renderPanel;
|
|
3943
|
+
private refreshPanel;
|
|
3944
|
+
private addFieldToZone;
|
|
3945
|
+
private removeFieldFromZone;
|
|
3946
|
+
private removeFromOtherZones;
|
|
3947
|
+
private addValueField;
|
|
3948
|
+
private removeValueField;
|
|
3949
|
+
private updateValueAggFunc;
|
|
3950
|
+
readonly styles: string;
|
|
3913
3951
|
}
|
|
3914
3952
|
|
|
3915
3953
|
export declare interface PivotResult {
|
|
@@ -3927,34 +3965,52 @@ declare interface PivotResult_2 {
|
|
|
3927
3965
|
}
|
|
3928
3966
|
|
|
3929
3967
|
declare interface PivotRow {
|
|
3968
|
+
/** Unique key for this row (hierarchical path) */
|
|
3930
3969
|
rowKey: string;
|
|
3970
|
+
/** Display label for this row */
|
|
3931
3971
|
rowLabel: string;
|
|
3972
|
+
/** Depth level (0 = top level) */
|
|
3932
3973
|
depth: number;
|
|
3974
|
+
/** Aggregated values by column key */
|
|
3933
3975
|
values: Record<string, number | null>;
|
|
3976
|
+
/** Row total across all columns */
|
|
3934
3977
|
total?: number;
|
|
3978
|
+
/** Whether this row has children (is a group header) */
|
|
3935
3979
|
isGroup: boolean;
|
|
3980
|
+
/** Child rows (for hierarchical grouping) */
|
|
3936
3981
|
children?: PivotRow[];
|
|
3982
|
+
/** Number of data rows in this group */
|
|
3983
|
+
rowCount?: number;
|
|
3937
3984
|
}
|
|
3938
3985
|
|
|
3939
3986
|
declare interface PivotRow_2 {
|
|
3987
|
+
/** Unique key for this row (hierarchical path) */
|
|
3940
3988
|
rowKey: string;
|
|
3989
|
+
/** Display label for this row */
|
|
3941
3990
|
rowLabel: string;
|
|
3991
|
+
/** Depth level (0 = top level) */
|
|
3942
3992
|
depth: number;
|
|
3993
|
+
/** Aggregated values by column key */
|
|
3943
3994
|
values: Record<string, number | null>;
|
|
3995
|
+
/** Row total across all columns */
|
|
3944
3996
|
total?: number;
|
|
3997
|
+
/** Whether this row has children (is a group header) */
|
|
3945
3998
|
isGroup: boolean;
|
|
3999
|
+
/** Child rows (for hierarchical grouping) */
|
|
3946
4000
|
children?: PivotRow_2[];
|
|
4001
|
+
/** Number of data rows in this group */
|
|
4002
|
+
rowCount?: number;
|
|
3947
4003
|
}
|
|
3948
4004
|
|
|
3949
4005
|
export declare interface PivotValueField {
|
|
3950
4006
|
field: string;
|
|
3951
|
-
aggFunc:
|
|
4007
|
+
aggFunc: AggFunc_2;
|
|
3952
4008
|
header?: string;
|
|
3953
4009
|
}
|
|
3954
4010
|
|
|
3955
4011
|
declare interface PivotValueField_2 {
|
|
3956
4012
|
field: string;
|
|
3957
|
-
aggFunc:
|
|
4013
|
+
aggFunc: AggFunc;
|
|
3958
4014
|
header?: string;
|
|
3959
4015
|
}
|
|
3960
4016
|
|
|
@@ -4265,8 +4321,6 @@ declare type RenderRow = GroupRowModelItem | DataRowModelItem;
|
|
|
4265
4321
|
*/
|
|
4266
4322
|
/** Configuration options for the reorder plugin */
|
|
4267
4323
|
declare interface ReorderConfig {
|
|
4268
|
-
/** Whether column reordering is enabled (default: true) */
|
|
4269
|
-
enabled?: boolean;
|
|
4270
4324
|
/** Whether to animate column movement (default: true) */
|
|
4271
4325
|
animation?: boolean;
|
|
4272
4326
|
/** Animation duration in milliseconds (default: 200) */
|
|
@@ -4316,7 +4370,7 @@ export declare class ReorderPlugin extends BaseGridPlugin_2<ReorderConfig> {
|
|
|
4316
4370
|
* Reset column order to the original configuration order.
|
|
4317
4371
|
*/
|
|
4318
4372
|
resetColumnOrder(): void;
|
|
4319
|
-
readonly styles
|
|
4373
|
+
readonly styles: string;
|
|
4320
4374
|
}
|
|
4321
4375
|
|
|
4322
4376
|
/** Controller managing drag-based column resize lifecycle. */
|
|
@@ -4378,6 +4432,15 @@ export declare interface RowGroupRenderConfig {
|
|
|
4378
4432
|
|
|
4379
4433
|
export declare const runAggregator: (ref: AggregatorRef_2_2 | undefined, rows: any[], field: string, column?: any) => any;
|
|
4380
4434
|
|
|
4435
|
+
/**
|
|
4436
|
+
* Run a value-based aggregator on a set of values.
|
|
4437
|
+
*
|
|
4438
|
+
* @param aggFunc - Aggregation function name
|
|
4439
|
+
* @param values - Array of numbers to aggregate
|
|
4440
|
+
* @returns Aggregated result
|
|
4441
|
+
*/
|
|
4442
|
+
export declare function runValueAggregator(aggFunc: string, values: number[]): number;
|
|
4443
|
+
|
|
4381
4444
|
/**
|
|
4382
4445
|
* Scroll event
|
|
4383
4446
|
*/
|
|
@@ -4524,11 +4587,10 @@ export declare class SelectionPlugin extends BaseGridPlugin_2<SelectionConfig_2>
|
|
|
4524
4587
|
* Set selected ranges programmatically.
|
|
4525
4588
|
*/
|
|
4526
4589
|
setRanges(ranges: CellRange_2[]): void;
|
|
4527
|
-
readonly styles
|
|
4590
|
+
readonly styles: string;
|
|
4528
4591
|
}
|
|
4529
4592
|
|
|
4530
4593
|
declare interface ServerSideConfig {
|
|
4531
|
-
enabled?: boolean;
|
|
4532
4594
|
pageSize?: number;
|
|
4533
4595
|
cacheBlockSize?: number;
|
|
4534
4596
|
maxConcurrentRequests?: number;
|
|
@@ -4716,13 +4778,13 @@ export declare interface ToolPanelConfig {
|
|
|
4716
4778
|
export declare interface ToolPanelDefinition {
|
|
4717
4779
|
/** Unique panel ID */
|
|
4718
4780
|
id: string;
|
|
4719
|
-
/** Panel title shown in header */
|
|
4781
|
+
/** Panel title shown in accordion header */
|
|
4720
4782
|
title: string;
|
|
4721
|
-
/** Icon for
|
|
4722
|
-
icon
|
|
4723
|
-
/**
|
|
4783
|
+
/** Icon for accordion section header (optional, emoji or SVG) */
|
|
4784
|
+
icon?: string;
|
|
4785
|
+
/** Tooltip for accordion section header */
|
|
4724
4786
|
tooltip?: string;
|
|
4725
|
-
/** Panel content factory - called when panel opens */
|
|
4787
|
+
/** Panel content factory - called when panel section opens */
|
|
4726
4788
|
render: (container: HTMLElement) => void | (() => void);
|
|
4727
4789
|
/** Called when panel closes (for cleanup) */
|
|
4728
4790
|
onClose?: () => void;
|
|
@@ -4736,13 +4798,13 @@ export declare interface ToolPanelDefinition {
|
|
|
4736
4798
|
declare interface ToolPanelDefinition_2 {
|
|
4737
4799
|
/** Unique panel ID */
|
|
4738
4800
|
id: string;
|
|
4739
|
-
/** Panel title shown in header */
|
|
4801
|
+
/** Panel title shown in accordion header */
|
|
4740
4802
|
title: string;
|
|
4741
|
-
/** Icon for
|
|
4742
|
-
icon
|
|
4743
|
-
/**
|
|
4803
|
+
/** Icon for accordion section header (optional, emoji or SVG) */
|
|
4804
|
+
icon?: string;
|
|
4805
|
+
/** Tooltip for accordion section header */
|
|
4744
4806
|
tooltip?: string;
|
|
4745
|
-
/** Panel content factory - called when panel opens */
|
|
4807
|
+
/** Panel content factory - called when panel section opens */
|
|
4746
4808
|
render: (container: HTMLElement) => void | (() => void);
|
|
4747
4809
|
/** Called when panel closes (for cleanup) */
|
|
4748
4810
|
onClose?: () => void;
|
|
@@ -4757,8 +4819,6 @@ declare interface ToolPanelDefinition_2 {
|
|
|
4757
4819
|
*/
|
|
4758
4820
|
/** Configuration options for the tree plugin */
|
|
4759
4821
|
export declare interface TreeConfig {
|
|
4760
|
-
/** Whether tree functionality is enabled (default: true) */
|
|
4761
|
-
enabled?: boolean;
|
|
4762
4822
|
/** Field name containing child rows (default: 'children') */
|
|
4763
4823
|
childrenField?: string;
|
|
4764
4824
|
/** Auto-detect tree structure from data (default: true) */
|
|
@@ -4778,8 +4838,6 @@ export declare interface TreeConfig {
|
|
|
4778
4838
|
*/
|
|
4779
4839
|
/** Configuration options for the tree plugin */
|
|
4780
4840
|
declare interface TreeConfig_2 {
|
|
4781
|
-
/** Whether tree functionality is enabled (default: true) */
|
|
4782
|
-
enabled?: boolean;
|
|
4783
4841
|
/** Field name containing child rows (default: 'children') */
|
|
4784
4842
|
childrenField?: string;
|
|
4785
4843
|
/** Auto-detect tree structure from data (default: true) */
|
|
@@ -4875,7 +4933,7 @@ export declare class TreePlugin extends BaseGridPlugin_2<TreeConfig_2> {
|
|
|
4875
4933
|
* Expand all ancestors of a node to make it visible.
|
|
4876
4934
|
*/
|
|
4877
4935
|
expandToKey(key: string): void;
|
|
4878
|
-
readonly styles
|
|
4936
|
+
readonly styles: string;
|
|
4879
4937
|
}
|
|
4880
4938
|
|
|
4881
4939
|
/**
|
|
@@ -4886,8 +4944,6 @@ export declare class TreePlugin extends BaseGridPlugin_2<TreeConfig_2> {
|
|
|
4886
4944
|
*/
|
|
4887
4945
|
/** Configuration for the undo/redo plugin */
|
|
4888
4946
|
declare interface UndoRedoConfig {
|
|
4889
|
-
/** Whether the plugin is enabled. Default: true */
|
|
4890
|
-
enabled?: boolean;
|
|
4891
4947
|
/** Maximum number of actions to keep in history. Default: 100 */
|
|
4892
4948
|
maxHistorySize?: number;
|
|
4893
4949
|
}
|
|
@@ -4960,6 +5016,8 @@ export declare class UndoRedoPlugin extends BaseGridPlugin_2<UndoRedoConfig> {
|
|
|
4960
5016
|
|
|
4961
5017
|
export declare const unregisterAggregator: (name: string) => void;
|
|
4962
5018
|
|
|
5019
|
+
export declare type ValueAggregatorFn = (values: number[]) => number;
|
|
5020
|
+
|
|
4963
5021
|
/** Virtual window bookkeeping; modified in-place as scroll position changes. */
|
|
4964
5022
|
declare interface VirtualState {
|
|
4965
5023
|
enabled: boolean;
|
|
@@ -4983,8 +5041,6 @@ declare interface VirtualState {
|
|
|
4983
5041
|
*/
|
|
4984
5042
|
/** Configuration options for the visibility plugin */
|
|
4985
5043
|
declare interface VisibilityConfig {
|
|
4986
|
-
/** Whether visibility control is enabled (default: true) */
|
|
4987
|
-
enabled?: boolean;
|
|
4988
5044
|
/** Allow hiding all columns (default: false) */
|
|
4989
5045
|
allowHideAll?: boolean;
|
|
4990
5046
|
}
|
|
@@ -5107,7 +5163,7 @@ export declare class VisibilityPlugin extends BaseGridPlugin_2<VisibilityConfig>
|
|
|
5107
5163
|
* On drop, emits a 'column-reorder-request' event for other plugins to handle.
|
|
5108
5164
|
*/
|
|
5109
5165
|
private setupDragListeners;
|
|
5110
|
-
readonly styles
|
|
5166
|
+
readonly styles: string;
|
|
5111
5167
|
}
|
|
5112
5168
|
|
|
5113
5169
|
export { }
|