@opencorestack/opengridx 1.1.0 → 1.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/CHANGELOG.md +29 -0
- package/dist/index.d.ts +60 -0
- package/dist/opengridx.es.js +2126 -2003
- package/dist/opengridx.es.js.map +1 -1
- package/dist/opengridx.umd.js +11 -11
- package/dist/opengridx.umd.js.map +1 -1
- package/docs/API_REFERENCE.md +50 -0
- package/docs/features/pdf-export.md +110 -0
- package/lib/components/Cell/Cell.tsx +5 -3
- package/lib/components/Cell/CellErrorBoundary.tsx +2 -2
- package/lib/index.ts +3 -1
- package/lib/types/index.ts +69 -0
- package/lib/utils/export/exportToPdf.test.ts +121 -0
- package/lib/utils/export/exportToPdf.ts +277 -0
- package/lib/utils/export/index.ts +3 -0
- package/lib/utils/export/pdf-types.d.ts +19 -0
- package/package.json +11 -1
|
@@ -553,3 +553,6 @@ function downloadFile(content: string, fileName: string, mimeType: string): void
|
|
|
553
553
|
document.body.removeChild(link);
|
|
554
554
|
URL.revokeObjectURL(url);
|
|
555
555
|
}
|
|
556
|
+
|
|
557
|
+
export { exportToPdf } from './exportToPdf';
|
|
558
|
+
export type { PdfExportOptions } from '../../types';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Ambient declarations for optional peer dependencies.
|
|
2
|
+
// These packages are listed in peerDependenciesMeta as optional and are NOT
|
|
3
|
+
// installed in devDependencies. The declarations here let TypeScript accept
|
|
4
|
+
// the dynamic imports without requiring the packages at build time.
|
|
5
|
+
// This file is excluded from the shipped .d.ts rollup so it does not
|
|
6
|
+
// conflict with a consumer's real jspdf types.
|
|
7
|
+
|
|
8
|
+
declare module 'jspdf' {
|
|
9
|
+
// Minimal shape — exportToPdf.ts only uses the JsPDFDoc interface it defines.
|
|
10
|
+
// The full jsPDF types are available when the consumer installs the package.
|
|
11
|
+
const JsPDF: new (opts?: Record<string, unknown>) => unknown;
|
|
12
|
+
export default JsPDF;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare module 'jspdf-autotable' {
|
|
16
|
+
// Side-effect import that augments jsPDF.prototype.autoTable.
|
|
17
|
+
const autoTable: unknown;
|
|
18
|
+
export default autoTable;
|
|
19
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencorestack/opengridx",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "OpenGridX: High-performance React data infrastructure. Unlock advanced Row Grouping, Excel Export, and Column Pinning without the usual \"Pro\" gatekeeping. Built for speed, scale, and complete architectural freedom. Fully open, virtualization-ready, and feature-complete.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/opengridx.umd.js",
|
|
@@ -78,12 +78,20 @@
|
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
80
|
"exceljs": ">=4.0.0",
|
|
81
|
+
"jspdf": ">=2.5.0",
|
|
82
|
+
"jspdf-autotable": ">=3.8.0",
|
|
81
83
|
"react": ">=18.0.0",
|
|
82
84
|
"react-dom": ">=18.0.0"
|
|
83
85
|
},
|
|
84
86
|
"peerDependenciesMeta": {
|
|
85
87
|
"exceljs": {
|
|
86
88
|
"optional": true
|
|
89
|
+
},
|
|
90
|
+
"jspdf": {
|
|
91
|
+
"optional": true
|
|
92
|
+
},
|
|
93
|
+
"jspdf-autotable": {
|
|
94
|
+
"optional": true
|
|
87
95
|
}
|
|
88
96
|
},
|
|
89
97
|
"devDependencies": {
|
|
@@ -101,6 +109,8 @@
|
|
|
101
109
|
"eslint-plugin-react-refresh": "^0.4.24",
|
|
102
110
|
"globals": "^16.5.0",
|
|
103
111
|
"jsdom": "^29.1.1",
|
|
112
|
+
"jspdf": "^4.2.1",
|
|
113
|
+
"jspdf-autotable": "^5.0.8",
|
|
104
114
|
"react": "^19.2.0",
|
|
105
115
|
"react-dom": "^19.2.0",
|
|
106
116
|
"react-router-dom": "^7.13.1",
|