@angular-bootstrap/ngbootstrap 2.0.0 → 2.0.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
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.0.1 - 2026-07-05
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Fixed `JsPdfAdapter` runtime loading in browser apps by allowing the bundler to resolve `jspdf` and `jspdf-autotable` from the consuming application.
|
|
8
|
+
|
|
3
9
|
## 2.0.0 - 2026-07-05
|
|
4
10
|
|
|
5
11
|
### Breaking Changes
|
package/RELEASE_NOTES.md
CHANGED
|
@@ -1,31 +1,18 @@
|
|
|
1
|
-
# @angular-bootstrap/ngbootstrap 2.0.
|
|
1
|
+
# @angular-bootstrap/ngbootstrap 2.0.1
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
This patch fixes PDF export in browser apps.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Fixed
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
- The package no longer references or requires the removed spreadsheet dependency.
|
|
10
|
-
- Documentation now explains the implementation choice, security rationale, migration path, and default adapter limitations.
|
|
7
|
+
- `JsPdfAdapter` no longer leaves `jspdf` and `jspdf-autotable` as bare browser runtime imports.
|
|
8
|
+
- Angular/Webpack can now resolve and bundle those maintained optional PDF integrations from the consuming application.
|
|
11
9
|
|
|
12
|
-
##
|
|
10
|
+
## Notes
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
Applications using PDF export should keep `jspdf` and `jspdf-autotable` installed:
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
The built-in browser adapter exports visible column values and basic scalar cell types. It does not generate formulas, charts, pivot tables, merged cells, multiple sheets, workbook styling, or macro-enabled files.
|
|
19
|
-
|
|
20
|
-
## Upgrade
|
|
21
|
-
|
|
22
|
-
```ts
|
|
23
|
-
import {
|
|
24
|
-
BrowserExcelExportAdapter,
|
|
25
|
-
ExcelExportAdapter,
|
|
26
|
-
} from '@angular-bootstrap/ngbootstrap';
|
|
27
|
-
|
|
28
|
-
providers: [
|
|
29
|
-
{ provide: ExcelExportAdapter, useClass: BrowserExcelExportAdapter },
|
|
30
|
-
];
|
|
14
|
+
```bash
|
|
15
|
+
npm install jspdf jspdf-autotable
|
|
31
16
|
```
|
|
17
|
+
|
|
18
|
+
Excel export remains dependency-free through `BrowserExcelExportAdapter`.
|
|
@@ -1251,8 +1251,8 @@ class NgbDatagridDefaultEditService {
|
|
|
1251
1251
|
|
|
1252
1252
|
class JsPdfAdapter {
|
|
1253
1253
|
async export({ fileName, columns, rows, options }) {
|
|
1254
|
-
const { jsPDF } = await import(
|
|
1255
|
-
const autoTable = (await import(
|
|
1254
|
+
const { jsPDF } = await import('jspdf');
|
|
1255
|
+
const autoTable = (await import('jspdf-autotable')).default;
|
|
1256
1256
|
const doc = new jsPDF({ orientation: options?.landscape ? 'landscape' : 'portrait' });
|
|
1257
1257
|
autoTable(doc, { head: [columns], body: rows.map(r => columns.map(k => r[k])), margin: options?.margins });
|
|
1258
1258
|
doc.save(`${fileName}.pdf`);
|