@angular-bootstrap/ngbootstrap 2.0.0 → 2.0.2

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,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.2 - 2026-07-05
4
+
5
+ ### Fixed
6
+
7
+ - Fixed PDF export bundling by loading jsPDF from its browser UMD bundle, avoiding build-time resolution of jsPDF optional ESM dependencies.
8
+
9
+ ## 2.0.1 - 2026-07-05
10
+
11
+ ### Fixed
12
+
13
+ - Fixed `JsPdfAdapter` runtime loading in browser apps by allowing the bundler to resolve `jspdf` and `jspdf-autotable` from the consuming application.
14
+
3
15
  ## 2.0.0 - 2026-07-05
4
16
 
5
17
  ### Breaking Changes
package/RELEASE_NOTES.md CHANGED
@@ -1,31 +1,18 @@
1
- # @angular-bootstrap/ngbootstrap 2.0.0
1
+ # @angular-bootstrap/ngbootstrap 2.0.2
2
2
 
3
- This release removes the DataGrid Excel export dependency on an unmaintained spreadsheet writer package and replaces it with a dependency-free browser adapter.
3
+ This patch fixes PDF export bundling for Angular browser apps.
4
4
 
5
- ## Highlights
5
+ ## Fixed
6
6
 
7
- - DataGrid Excel export now uses `BrowserExcelExportAdapter` by default.
8
- - The adapter implements the existing `ExcelExportAdapter` contract, so applications can still provide a custom exporter through Angular DI.
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` now loads jsPDF from its browser UMD bundle.
8
+ - This avoids forcing consuming apps to resolve jsPDF optional ESM dependencies such as HTML/canvas sanitization helpers when they only need table PDF export.
11
9
 
12
- ## Breaking Change
10
+ ## Notes
13
11
 
14
- The previous spreadsheet adapter has been removed from the public API. Use `BrowserExcelExportAdapter` or provide your own `ExcelExportAdapter`.
12
+ Applications using PDF export should keep both maintained PDF integrations installed:
15
13
 
16
- ## Limitations
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(/* webpackIgnore: true */ 'jspdf');
1255
- const autoTable = (await import(/* webpackIgnore: true */ 'jspdf-autotable')).default;
1254
+ const { jsPDF } = await import('jspdf/dist/jspdf.umd.min.js');
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`);