@toolbox-web/grid 2.8.1 → 2.10.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.js +2 -2
- package/all.js.map +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/lib/core/internal/dom-builder.d.ts +8 -0
- package/lib/core/plugin/index.d.ts +1 -0
- package/lib/core/plugin/types.d.ts +61 -0
- package/lib/core/types.d.ts +68 -2
- 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.map +1 -1
- package/lib/plugins/editing/index.js.map +1 -1
- package/lib/plugins/export/index.js +1 -1
- package/lib/plugins/export/index.js.map +1 -1
- package/lib/plugins/export/types.d.ts +35 -5
- package/lib/plugins/filtering/index.js.map +1 -1
- package/lib/plugins/grouping-columns/index.js +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.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.map +1 -1
- package/lib/plugins/pivot/index.js.map +1 -1
- package/lib/plugins/print/index.js.map +1 -1
- package/lib/plugins/reorder-columns/index.js.map +1 -1
- package/lib/plugins/reorder-rows/index.js.map +1 -1
- package/lib/plugins/responsive/index.js.map +1 -1
- package/lib/plugins/row-drag-drop/index.js.map +1 -1
- package/lib/plugins/selection/index.js.map +1 -1
- package/lib/plugins/server-side/index.js.map +1 -1
- package/lib/plugins/sticky-rows/index.js.map +1 -1
- package/lib/plugins/tooltip/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/public.d.ts +1 -1
- package/umd/grid.all.umd.js +1 -1
- package/umd/grid.all.umd.js.map +1 -1
- package/umd/grid.umd.js +1 -1
- package/umd/grid.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/grouping-columns.umd.js +1 -1
- package/umd/plugins/grouping-columns.umd.js.map +1 -1
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Export Plugin Types
|
|
3
|
-
*
|
|
4
|
-
* Type definitions for the data export feature.
|
|
5
|
-
*/
|
|
1
|
+
import { HeaderRowCell, HeaderRowContribution } from '../../core/plugin/types';
|
|
6
2
|
/**
|
|
7
3
|
* Supported export file formats.
|
|
8
4
|
*
|
|
@@ -76,6 +72,20 @@ export interface ExportParams {
|
|
|
76
72
|
processCell?: (value: any, field: string, row: any) => any;
|
|
77
73
|
/** Custom header processor */
|
|
78
74
|
processHeader?: (header: string, field: string) => string;
|
|
75
|
+
/**
|
|
76
|
+
* Custom processor for cells in **plugin-contributed header rows** (e.g. the
|
|
77
|
+
* column-group header row above the leaf headers). Runs once per cell.
|
|
78
|
+
*
|
|
79
|
+
* Return `null` to blank a cell (its `span` is preserved so neighbours stay
|
|
80
|
+
* aligned). If **every** cell in a row is blank after processing, the
|
|
81
|
+
* entire row is dropped from the output. Return the same `cell` unchanged
|
|
82
|
+
* to keep it as-is.
|
|
83
|
+
*
|
|
84
|
+
* @param cell - The contributed cell (`label`, `span`, optional `source`).
|
|
85
|
+
* @param rowIndex - 0-based index of the contributed row (top-down).
|
|
86
|
+
* @since 2.10.0
|
|
87
|
+
*/
|
|
88
|
+
processHeaderRow?: (cell: HeaderRowCell, rowIndex: number) => HeaderRowCell | null;
|
|
79
89
|
/**
|
|
80
90
|
* Controls how cell values are produced. See {@link ExportMode}.
|
|
81
91
|
*
|
|
@@ -86,6 +96,17 @@ export interface ExportParams {
|
|
|
86
96
|
mode?: ExportMode;
|
|
87
97
|
/** Excel style configuration (only applies to Excel export) */
|
|
88
98
|
excelStyles?: ExcelStyleConfig;
|
|
99
|
+
/**
|
|
100
|
+
* Plugin-contributed extra header rows that sit **above** the leaf header
|
|
101
|
+
* row. Normally populated automatically from the `'collectHeaderRows'`
|
|
102
|
+
* broadcast in `ExportPlugin.export*()`; you only set it manually when
|
|
103
|
+
* calling the pure formatters ({@link ExportPlugin.formatCsv} /
|
|
104
|
+
* {@link ExportPlugin.formatExcel}) with pre-built row data.
|
|
105
|
+
*
|
|
106
|
+
* Ignored when `includeHeaders` is `false`.
|
|
107
|
+
* @since 2.10.0
|
|
108
|
+
*/
|
|
109
|
+
headerRows?: HeaderRowContribution[];
|
|
89
110
|
}
|
|
90
111
|
/**
|
|
91
112
|
* Configuration for styled Excel export.
|
|
@@ -97,6 +118,15 @@ export interface ExportParams {
|
|
|
97
118
|
export interface ExcelStyleConfig {
|
|
98
119
|
/** Style applied to all header cells */
|
|
99
120
|
headerStyle?: ExcelCellStyle;
|
|
121
|
+
/**
|
|
122
|
+
* Style applied to cells in **plugin-contributed header rows** (e.g. the
|
|
123
|
+
* column-group header row). Falls back to `headerStyle` when omitted.
|
|
124
|
+
*
|
|
125
|
+
* Use this to visually distinguish group/super headers from leaf headers
|
|
126
|
+
* (e.g. heavier weight, larger font, accent fill).
|
|
127
|
+
* @since 2.10.0
|
|
128
|
+
*/
|
|
129
|
+
groupHeaderStyle?: ExcelCellStyle;
|
|
100
130
|
/** Default style for all data cells */
|
|
101
131
|
defaultStyle?: ExcelCellStyle;
|
|
102
132
|
/** Per-column style overrides (keyed by field name) */
|