@opencorestack/opengridx 1.1.0 → 1.2.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/CHANGELOG.md CHANGED
@@ -5,6 +5,18 @@
5
5
 
6
6
  ---
7
7
 
8
+ ## [1.2.0] — 2026-09-03
9
+
10
+ ### Added
11
+ - `exportToPdf(rows, columns, options?)` — generate a styled PDF report from grid data.
12
+ Optional peer deps required: `npm install jspdf jspdf-autotable`.
13
+ Features: optional branded header (logo, title, filter summary, row count), multi-page
14
+ data table with repeating column headers, alternating row shading, aggregation footer row.
15
+ See `docs/features/pdf-export.md`.
16
+ - New exported type: `PdfExportOptions`
17
+
18
+ ---
19
+
8
20
  ## [1.1.0] — 2026-09-02
9
21
 
10
22
  ### Added
package/dist/index.d.ts CHANGED
@@ -368,6 +368,8 @@ export declare function exportToExcelAdvanced<R extends GridRowModel>(rows: R[],
368
368
  */
369
369
  export declare function exportToJson<R extends GridRowModel>(rows: R[], columns: GridColDef<R>[], options?: JsonExportOptions): void;
370
370
 
371
+ export declare function exportToPdf<R extends GridRowModel>(rows: R[], columns: GridColDef<R>[], options?: PdfExportOptions): Promise<void>;
372
+
371
373
  export declare const FilterPanel: default_2.FC<FilterPanelProps>;
372
374
 
373
375
  declare interface FilterPanelProps {
@@ -1172,6 +1174,64 @@ export declare interface JsonExportOptions {
1172
1174
  aggregationModel?: GridAggregationModel | null;
1173
1175
  }
1174
1176
 
1177
+ /**
1178
+ * Configuration options for exporting the DataGrid to PDF format.
1179
+ * Requires jspdf and jspdf-autotable peer dependencies.
1180
+ */
1181
+ export declare interface PdfExportOptions {
1182
+ /**
1183
+ * Output filename without extension. Default: 'export'
1184
+ */
1185
+ fileName?: string;
1186
+ /**
1187
+ * Title text displayed in the document header.
1188
+ * When omitted, no header block is rendered.
1189
+ */
1190
+ title?: string;
1191
+ /**
1192
+ * URL or data URI of a logo image rendered left of the title.
1193
+ * Only used when `title` is also set. Default: none
1194
+ */
1195
+ logoUrl?: string;
1196
+ /**
1197
+ * Page orientation. Default: 'landscape'
1198
+ */
1199
+ orientation?: 'portrait' | 'landscape';
1200
+ /**
1201
+ * If provided, only rows whose id is in this array are exported.
1202
+ */
1203
+ selectedRows?: (string | number)[];
1204
+ /**
1205
+ * Aggregation result from apiRef.current.getAggregationResult().
1206
+ * When provided alongside aggregationModel, appends a footer row.
1207
+ */
1208
+ aggregationResult?: Record<string, unknown> | null;
1209
+ /**
1210
+ * Aggregation model from apiRef.current.getAggregationModel().
1211
+ */
1212
+ aggregationModel?: GridAggregationModel | null;
1213
+ /**
1214
+ * Active filter model. When provided, a filter summary is shown in the header.
1215
+ */
1216
+ filterModel?: GridFilterModel | null;
1217
+ /**
1218
+ * Whether to apply alternating row shading. Default: true
1219
+ */
1220
+ alternateRowColor?: boolean;
1221
+ /**
1222
+ * Column header background color (hex). Default: '#4f46e5'
1223
+ */
1224
+ headerBackgroundColor?: string;
1225
+ /**
1226
+ * Column header text color (hex). Default: '#ffffff'
1227
+ */
1228
+ headerTextColor?: string;
1229
+ /**
1230
+ * Base font size in points for table body. Default: 9
1231
+ */
1232
+ fontSize?: number;
1233
+ }
1234
+
1175
1235
  /**
1176
1236
  * Open print dialog with formatted table
1177
1237
  */