@angular-bootstrap/ngbootstrap 2.0.1 → 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,11 @@
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
+
3
9
  ## 2.0.1 - 2026-07-05
4
10
 
5
11
  ### Fixed
package/RELEASE_NOTES.md CHANGED
@@ -1,15 +1,15 @@
1
- # @angular-bootstrap/ngbootstrap 2.0.1
1
+ # @angular-bootstrap/ngbootstrap 2.0.2
2
2
 
3
- This patch fixes PDF export in browser apps.
3
+ This patch fixes PDF export bundling for Angular browser apps.
4
4
 
5
5
  ## Fixed
6
6
 
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.
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.
9
9
 
10
10
  ## Notes
11
11
 
12
- Applications using PDF export should keep `jspdf` and `jspdf-autotable` installed:
12
+ Applications using PDF export should keep both maintained PDF integrations installed:
13
13
 
14
14
  ```bash
15
15
  npm install jspdf jspdf-autotable
@@ -1251,7 +1251,7 @@ class NgbDatagridDefaultEditService {
1251
1251
 
1252
1252
  class JsPdfAdapter {
1253
1253
  async export({ fileName, columns, rows, options }) {
1254
- const { jsPDF } = await import('jspdf');
1254
+ const { jsPDF } = await import('jspdf/dist/jspdf.umd.min.js');
1255
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 });