shark-ng-table 7.0.0 → 8.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/README.md +66 -52
- package/fesm2022/shark-ng-table.mjs +2191 -1833
- package/fesm2022/shark-ng-table.mjs.map +1 -1
- package/package.json +43 -31
- package/shark-ng-table.css +19 -1
- package/shark-ng-table.min.css +2 -4
- package/types/shark-ng-table.d.ts +913 -0
- package/app/table/child.component.d.ts +0 -34
- package/app/table/column-change-event.d.ts +0 -5
- package/app/table/column.d.ts +0 -64
- package/app/table/current.data.event.d.ts +0 -5
- package/app/table/dynamic/dynamic.contents.d.ts +0 -20
- package/app/table/dynamic/dynamic.contents.directive.d.ts +0 -8
- package/app/table/header-button.component.d.ts +0 -16
- package/app/table/index.d.ts +0 -15
- package/app/table/localfilter.pipe.d.ts +0 -11
- package/app/table/notifier/aria-notifier.component.d.ts +0 -14
- package/app/table/notifier/notifier.service.d.ts +0 -7
- package/app/table/page.change.event.d.ts +0 -27
- package/app/table/page.d.ts +0 -20
- package/app/table/sort.type.d.ts +0 -30
- package/app/table/table.body.component.d.ts +0 -67
- package/app/table/table.cell.component.d.ts +0 -20
- package/app/table/table.component.d.ts +0 -202
- package/app/table/table.footer.component.d.ts +0 -49
- package/app/table/table.header.component.d.ts +0 -39
- package/app/table/table.info.header.component.d.ts +0 -28
- package/app/table/table.module.d.ts +0 -21
- package/app/table/table.pagination.component.d.ts +0 -21
- package/app/table/table.utils.d.ts +0 -13
- package/esm2022/app/table/child.component.mjs +0 -76
- package/esm2022/app/table/column-change-event.mjs +0 -5
- package/esm2022/app/table/column.mjs +0 -2
- package/esm2022/app/table/current.data.event.mjs +0 -5
- package/esm2022/app/table/dynamic/dynamic.contents.directive.mjs +0 -17
- package/esm2022/app/table/dynamic/dynamic.contents.mjs +0 -2
- package/esm2022/app/table/header-button.component.mjs +0 -52
- package/esm2022/app/table/index.mjs +0 -11
- package/esm2022/app/table/localfilter.pipe.mjs +0 -24
- package/esm2022/app/table/notifier/aria-notifier.component.mjs +0 -44
- package/esm2022/app/table/notifier/notifier.service.mjs +0 -13
- package/esm2022/app/table/page.change.event.mjs +0 -2
- package/esm2022/app/table/page.mjs +0 -2
- package/esm2022/app/table/sort.type.mjs +0 -32
- package/esm2022/app/table/table.body.component.mjs +0 -181
- package/esm2022/app/table/table.cell.component.mjs +0 -75
- package/esm2022/app/table/table.component.mjs +0 -773
- package/esm2022/app/table/table.footer.component.mjs +0 -176
- package/esm2022/app/table/table.header.component.mjs +0 -204
- package/esm2022/app/table/table.info.header.component.mjs +0 -142
- package/esm2022/app/table/table.module.mjs +0 -73
- package/esm2022/app/table/table.pagination.component.mjs +0 -134
- package/esm2022/app/table/table.utils.mjs +0 -72
- package/esm2022/public_api.mjs +0 -2
- package/esm2022/shark-ng-table.mjs +0 -5
- package/index.d.ts +0 -5
- package/public_api.d.ts +0 -1
package/README.md
CHANGED
|
@@ -1,76 +1,90 @@
|
|
|
1
1
|
# shark-ng-table
|
|
2
2
|
|
|
3
|
-
][npm-badge-url]
|
|
8
|
-
[][npm-badge-url]
|
|
9
|
-
[][npm-badge-url]
|
|
3
|
+
[](https://github.com/sharkops-io/shark-ng-table/actions/workflows/ci.yml)
|
|
4
|
+
[][npm-badge-url]
|
|
5
|
+
[][npm-badge-url]
|
|
6
|
+
[][npm-badge-url]
|
|
10
7
|
|
|
11
8
|
[npm-badge-url]: https://www.npmjs.com/package/shark-ng-table
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Section508 and WCAG 2.0 AA compliant.
|
|
16
|
-
|
|
17
|
-
## Versions
|
|
10
|
+
An Angular data table built for keyboard and screen reader users. Built to meet WCAG 2.2 AA, and tested with axe-core and keyboard tests in a real browser on every change. See [ACCESSIBILITY.md](ACCESSIBILITY.md) for what is tested and how.
|
|
18
11
|
|
|
19
|
-
|
|
20
|
-
| --------------- | ---------------------- |
|
|
21
|
-
| >= 6.0.0 | >= 6.0.0 |
|
|
22
|
-
| >= 16.0.0 | >= 7.0.0 |
|
|
12
|
+
**Docs and live examples: https://shark-ng-table.sharkops.io/**
|
|
23
13
|
|
|
24
|
-
##
|
|
25
|
-
|
|
26
|
-
There are a number of samples available that can be viewed here: https://www.quantasnet.com/shark-ng-table/
|
|
14
|
+
## Features
|
|
27
15
|
|
|
28
|
-
|
|
16
|
+
- Filtering, global or per column
|
|
17
|
+
- Sorting, including multiple columns and custom sort functions
|
|
18
|
+
- Client-side or server-side paging
|
|
19
|
+
- Column reordering and a column picker
|
|
20
|
+
- Expandable child rows
|
|
21
|
+
- Custom cell rendering with your own component or pipe
|
|
22
|
+
- Row links, including middle click and Ctrl/Cmd click to open a new tab
|
|
23
|
+
- Every change announced to screen readers through a live region
|
|
29
24
|
|
|
30
|
-
##
|
|
25
|
+
## Versions
|
|
31
26
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
- Column reordering
|
|
38
|
-
- Column hide/show
|
|
39
|
-
- Custom cell rendering with user provided Component or Pipe
|
|
27
|
+
| Angular | shark-ng-table |
|
|
28
|
+
| --------------- | -------------- |
|
|
29
|
+
| 21 and 22 | 8.x |
|
|
30
|
+
| 16 to 20 | 7.x |
|
|
31
|
+
| 6 to 15 | 6.x |
|
|
40
32
|
|
|
41
|
-
##
|
|
33
|
+
## Install
|
|
42
34
|
|
|
43
35
|
```bash
|
|
44
|
-
npm install
|
|
36
|
+
npm install shark-ng-table
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
import { Component } from '@angular/core';
|
|
41
|
+
import { SharkColumn, SharkTableComponent } from 'shark-ng-table';
|
|
42
|
+
|
|
43
|
+
@Component({
|
|
44
|
+
selector: 'app-cars',
|
|
45
|
+
imports: [SharkTableComponent],
|
|
46
|
+
template: `<shark-table caption="Cars" [data]="cars" [columns]="columns"></shark-table>`
|
|
47
|
+
})
|
|
48
|
+
export class CarsComponent {
|
|
49
|
+
cars = [{ year: 2017, make: 'Subaru', model: 'WRX' }];
|
|
50
|
+
columns: SharkColumn[] = [
|
|
51
|
+
{ header: 'Year', property: 'year' },
|
|
52
|
+
{ header: 'Make', property: 'make' },
|
|
53
|
+
{ header: 'Model', property: 'model' }
|
|
54
|
+
];
|
|
55
|
+
}
|
|
45
56
|
```
|
|
46
57
|
|
|
47
|
-
|
|
58
|
+
Then add `node_modules/shark-ng-table/shark-ng-table.min.css` to the `styles` in your `angular.json`.
|
|
48
59
|
|
|
49
60
|
## Documentation
|
|
50
61
|
|
|
51
|
-
|
|
52
|
-
- [Styling <shark-table>](usage/styling.md)
|
|
53
|
-
- [<shark-table> Options](usage/shark-table-options.md)
|
|
54
|
-
- [Column Options](usage/column-options.md)
|
|
55
|
-
- [Child Rows](usage/child-rows.md)
|
|
56
|
-
- [Developer Guide](usage/developers.md)
|
|
57
|
-
- [Change Log](CHANGELOG.md)
|
|
62
|
+
The guides are on the [docs site](https://shark-ng-table.sharkops.io/) and in this repository:
|
|
58
63
|
|
|
59
|
-
|
|
64
|
+
- [Getting started](usage/setup.md)
|
|
65
|
+
- [Styling](usage/styling.md)
|
|
66
|
+
- [Table options](usage/shark-table-options.md)
|
|
67
|
+
- [Column options](usage/column-options.md)
|
|
68
|
+
- [Child rows](usage/child-rows.md)
|
|
69
|
+
- [Upgrading to 8.0](usage/migrating.md)
|
|
70
|
+
- [Accessibility testing](ACCESSIBILITY.md)
|
|
71
|
+
- [Contributing](usage/developers.md) and [releasing](RELEASING.md)
|
|
72
|
+
- [Change log](CHANGELOG.md)
|
|
60
73
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
74
|
+
## Development
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
npm ci
|
|
78
|
+
npm start # docs site at http://localhost:4200, using the library source
|
|
79
|
+
npm test # unit tests, including axe checks
|
|
80
|
+
npm run e2e # accessibility tests in a real browser (Playwright)
|
|
81
|
+
npm run lint
|
|
82
|
+
npm run build # package in dist/shark-ng-table
|
|
83
|
+
```
|
|
64
84
|
|
|
65
|
-
|
|
66
|
-
- Make sure all tests are passing
|
|
67
|
-
- Make sure the sample site works in the VSCode devcontainer, open the container, run `npm start` and make sure the app at https://localhost:4200 works
|
|
68
|
-
- `npm run clean && npm run build`
|
|
69
|
-
- Make sure the dist directory looks good by running `npm publish dist/ --dry-run`, there should be folders like `fesm2022`, `esm2022` etc.
|
|
70
|
-
- Run `npm publish dist/`
|
|
71
|
-
- Make sure to run the npm script for deploying to GitHub pages as well. TODO: make this automated
|
|
85
|
+
A [dev container](.devcontainer/devcontainer.json) is included for VS Code and GitHub Codespaces.
|
|
72
86
|
|
|
73
87
|
## Attribution
|
|
74
88
|
|
|
75
|
-
|
|
76
|
-
|
|
89
|
+
- Developed and tested in collaboration with Great Lakes Higher Education Corporation and Nelnet Inc. and Affiliates
|
|
90
|
+
- Icons from [Font Awesome](https://fontawesome.com/), see their [license](https://fontawesome.com/license)
|