@angular-bootstrap/ngbootstrap 0.0.13 → 2.0.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 +36 -0
- package/README.md +67 -74
- package/RELEASE_NOTES.md +31 -0
- package/fesm2022/angular-bootstrap-ngbootstrap.mjs +11363 -1417
- package/fesm2022/angular-bootstrap-ngbootstrap.mjs.map +1 -1
- package/package.json +17 -15
- package/types/angular-bootstrap-ngbootstrap.d.ts +1552 -119
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 2.0.0 - 2026-07-05
|
|
4
|
+
|
|
5
|
+
### Breaking Changes
|
|
6
|
+
|
|
7
|
+
- Removed the previous public spreadsheet adapter export.
|
|
8
|
+
- Replaced the DataGrid default Excel export implementation with `BrowserExcelExportAdapter`.
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Added `BrowserExcelExportAdapter`, a dependency-free browser workbook exporter that implements `ExcelExportAdapter`.
|
|
13
|
+
- Added tests for the browser Excel export adapter.
|
|
14
|
+
- Added documentation that explains why Excel export is dependency-free and when to provide a custom adapter.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- DataGrid Excel export no longer depends on an unmaintained spreadsheet writer package.
|
|
19
|
+
- The default Excel export path generates an Excel-compatible SpreadsheetML workbook in the browser.
|
|
20
|
+
- Documentation now calls out the limitations of the default adapter: visible column values and basic scalar cell types only; no formulas, charts, pivot tables, merged cells, multiple sheets, workbook styling, or macro-enabled files.
|
|
21
|
+
|
|
22
|
+
### Migration
|
|
23
|
+
|
|
24
|
+
- Replace imports of the previous spreadsheet adapter with `BrowserExcelExportAdapter`.
|
|
25
|
+
- If your application needs advanced workbook generation, provide your own `ExcelExportAdapter` implementation.
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import {
|
|
29
|
+
BrowserExcelExportAdapter,
|
|
30
|
+
ExcelExportAdapter,
|
|
31
|
+
} from '@angular-bootstrap/ngbootstrap';
|
|
32
|
+
|
|
33
|
+
providers: [
|
|
34
|
+
{ provide: ExcelExportAdapter, useClass: BrowserExcelExportAdapter },
|
|
35
|
+
];
|
|
36
|
+
```
|
package/README.md
CHANGED
|
@@ -1,93 +1,86 @@
|
|
|
1
1
|
# @angular-bootstrap/ngbootstrap
|
|
2
2
|
|
|
3
|
-
Angular UI
|
|
3
|
+
Standalone Angular UI components with Bootstrap-friendly styling.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## What Is Included
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
- Splitter
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
- Angular + Bootstrap first – built for modern Angular (v21) and works with plain Bootstrap CSS; Material/Tailwind can be layered via custom styles.
|
|
7
|
+
- DataGrid
|
|
8
|
+
- Pagination
|
|
9
|
+
- Typeahead
|
|
10
|
+
- Tree
|
|
11
|
+
- Splitter
|
|
12
|
+
- Stepper
|
|
13
|
+
- Chips
|
|
14
|
+
- Drag and drop
|
|
16
15
|
|
|
17
|
-
##
|
|
16
|
+
## Requirements
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Make sure your app:
|
|
18
|
+
- Angular `>=21.0.0 <23.0.0`
|
|
19
|
+
- RxJS `^7.8.0`
|
|
20
|
+
- Bootstrap CSS in the consuming app
|
|
21
|
+
- Bootstrap Icons when icon-based examples are used
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
- Includes Bootstrap CSS + Bootstrap Icons (for example in `angular.json` or global styles):
|
|
23
|
+
## Install
|
|
27
24
|
|
|
28
|
-
```
|
|
29
|
-
@
|
|
30
|
-
@import 'bootstrap-icons/font/bootstrap-icons.css';
|
|
25
|
+
```bash
|
|
26
|
+
npm install @angular-bootstrap/ngbootstrap bootstrap bootstrap-icons
|
|
31
27
|
```
|
|
32
28
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
All components are standalone, so you import them directly into your feature components.
|
|
29
|
+
Optional integrations are installed only when you use those features:
|
|
36
30
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
- Sorting (`enableSorting`, `sortChange`).
|
|
40
|
-
- Column/global filtering (`enableFiltering`, `enableGlobalFilter`, `filtersChange`).
|
|
41
|
-
- Pagination (`enablePagination`, `pageSize`, `pageChange`).
|
|
42
|
-
- Inline add/edit/delete (`enableAdd`, `enableEdit`, `enableDelete`, `rowAdd`, `rowSave`, `rowDelete`).
|
|
43
|
-
- Stable row identity via `trackBy` (defaults to index).
|
|
44
|
-
- Pluggable editing logic via `editService` (implement `NgbDatagridEditService`).
|
|
45
|
-
- Export to PDF/Excel via `exportOptions`.
|
|
46
|
-
|
|
47
|
-
Export requires optional peer dependencies. Install only if you use export:
|
|
48
|
-
|
|
49
|
-
```sh
|
|
50
|
-
npm install jspdf jspdf-autotable xlsx
|
|
31
|
+
```bash
|
|
32
|
+
npm install chart.js jspdf jspdf-autotable
|
|
51
33
|
```
|
|
52
34
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
35
|
+
Excel export is dependency-free by default. The built-in `BrowserExcelExportAdapter`
|
|
36
|
+
generates an Excel-compatible workbook in the browser and avoids unmaintained
|
|
37
|
+
spreadsheet writer dependencies. It is intended for visible column values and
|
|
38
|
+
basic scalar cell types; use a custom `ExcelExportAdapter` for formulas, charts,
|
|
39
|
+
multiple sheets, workbook styling, or other advanced workbook features.
|
|
40
|
+
|
|
41
|
+
## Use
|
|
42
|
+
|
|
43
|
+
Import standalone components directly in your Angular component.
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
import { Component } from '@angular/core';
|
|
47
|
+
import { NgbDatagridComponent, type ColumnDef } from '@angular-bootstrap/ngbootstrap';
|
|
48
|
+
|
|
49
|
+
@Component({
|
|
50
|
+
selector: 'app-users-grid',
|
|
51
|
+
standalone: true,
|
|
52
|
+
imports: [NgbDatagridComponent],
|
|
53
|
+
template: `
|
|
54
|
+
<ngb-datagrid
|
|
55
|
+
[data]="users"
|
|
56
|
+
[columns]="columns"
|
|
57
|
+
[enableSorting]="true"
|
|
58
|
+
filterable="row"
|
|
59
|
+
[enablePagination]="true"
|
|
60
|
+
[pageSize]="10"
|
|
61
|
+
/>
|
|
62
|
+
`,
|
|
63
|
+
})
|
|
64
|
+
export class UsersGridComponent {
|
|
65
|
+
users = [
|
|
66
|
+
{ id: 1, name: 'Ava Patel', role: 'Admin' },
|
|
67
|
+
{ id: 2, name: 'Noah Chen', role: 'Editor' },
|
|
68
|
+
];
|
|
69
|
+
|
|
70
|
+
columns: ColumnDef[] = [
|
|
71
|
+
{ field: 'id', header: 'ID', type: 'number', width: 90, sortable: true },
|
|
72
|
+
{ field: 'name', header: 'Name', type: 'text', sortable: true, filterable: true },
|
|
73
|
+
{ field: 'role', header: 'Role', type: 'text', filterable: true },
|
|
74
|
+
];
|
|
75
|
+
}
|
|
76
|
+
```
|
|
63
77
|
|
|
64
78
|
## Development
|
|
65
79
|
|
|
66
|
-
Local setup:
|
|
67
|
-
|
|
68
80
|
```bash
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
npm run build
|
|
81
|
+
pnpm install
|
|
82
|
+
pnpm test
|
|
83
|
+
pnpm build
|
|
73
84
|
```
|
|
74
85
|
|
|
75
|
-
|
|
76
|
-
- Tests are powered by Jest + `jest-preset-angular`.
|
|
77
|
-
|
|
78
|
-
## Releasing
|
|
79
|
-
|
|
80
|
-
Releases are automated via GitHub Actions:
|
|
81
|
-
|
|
82
|
-
- Non‑`main` branches:
|
|
83
|
-
- `.github/workflows/ci.yml` runs install, tests, build only.
|
|
84
|
-
- `main` branch:
|
|
85
|
-
- `.github/workflows/release.yml` runs install, tests, build and publishes to npm using `NPM_TOKEN` from repository secrets.
|
|
86
|
-
|
|
87
|
-
Recommended release flow:
|
|
88
|
-
|
|
89
|
-
- On your local machine:
|
|
90
|
-
- Decide the new version (e.g. `1.1.0`).
|
|
91
|
-
- Run `npm version minor` or `npm version patch` to bump `package.json` and create the tag.
|
|
92
|
-
- Push the commit and tag: `git push origin main --tags`.
|
|
93
|
-
- GitHub Actions will build and publish that tagged version to npm.
|
|
86
|
+
Build output is written to `dist/`.
|
package/RELEASE_NOTES.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# @angular-bootstrap/ngbootstrap 2.0.0
|
|
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.
|
|
4
|
+
|
|
5
|
+
## Highlights
|
|
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.
|
|
11
|
+
|
|
12
|
+
## Breaking Change
|
|
13
|
+
|
|
14
|
+
The previous spreadsheet adapter has been removed from the public API. Use `BrowserExcelExportAdapter` or provide your own `ExcelExportAdapter`.
|
|
15
|
+
|
|
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
|
+
];
|
|
31
|
+
```
|