shark-ng-table 7.0.0-rc3 → 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.
Files changed (57) hide show
  1. package/README.md +66 -52
  2. package/fesm2022/shark-ng-table.mjs +2191 -1833
  3. package/fesm2022/shark-ng-table.mjs.map +1 -1
  4. package/package.json +43 -31
  5. package/shark-ng-table.css +19 -1
  6. package/shark-ng-table.min.css +2 -4
  7. package/types/shark-ng-table.d.ts +913 -0
  8. package/app/table/child.component.d.ts +0 -34
  9. package/app/table/column-change-event.d.ts +0 -5
  10. package/app/table/column.d.ts +0 -64
  11. package/app/table/current.data.event.d.ts +0 -5
  12. package/app/table/dynamic/dynamic.contents.d.ts +0 -20
  13. package/app/table/dynamic/dynamic.contents.directive.d.ts +0 -8
  14. package/app/table/header-button.component.d.ts +0 -16
  15. package/app/table/index.d.ts +0 -15
  16. package/app/table/localfilter.pipe.d.ts +0 -11
  17. package/app/table/notifier/aria-notifier.component.d.ts +0 -14
  18. package/app/table/notifier/notifier.service.d.ts +0 -7
  19. package/app/table/page.change.event.d.ts +0 -27
  20. package/app/table/page.d.ts +0 -20
  21. package/app/table/sort.type.d.ts +0 -30
  22. package/app/table/table.body.component.d.ts +0 -67
  23. package/app/table/table.cell.component.d.ts +0 -20
  24. package/app/table/table.component.d.ts +0 -202
  25. package/app/table/table.footer.component.d.ts +0 -49
  26. package/app/table/table.header.component.d.ts +0 -39
  27. package/app/table/table.info.header.component.d.ts +0 -28
  28. package/app/table/table.module.d.ts +0 -21
  29. package/app/table/table.pagination.component.d.ts +0 -21
  30. package/app/table/table.utils.d.ts +0 -13
  31. package/esm2022/app/table/child.component.mjs +0 -76
  32. package/esm2022/app/table/column-change-event.mjs +0 -5
  33. package/esm2022/app/table/column.mjs +0 -2
  34. package/esm2022/app/table/current.data.event.mjs +0 -5
  35. package/esm2022/app/table/dynamic/dynamic.contents.directive.mjs +0 -17
  36. package/esm2022/app/table/dynamic/dynamic.contents.mjs +0 -2
  37. package/esm2022/app/table/header-button.component.mjs +0 -52
  38. package/esm2022/app/table/index.mjs +0 -11
  39. package/esm2022/app/table/localfilter.pipe.mjs +0 -24
  40. package/esm2022/app/table/notifier/aria-notifier.component.mjs +0 -44
  41. package/esm2022/app/table/notifier/notifier.service.mjs +0 -13
  42. package/esm2022/app/table/page.change.event.mjs +0 -2
  43. package/esm2022/app/table/page.mjs +0 -2
  44. package/esm2022/app/table/sort.type.mjs +0 -32
  45. package/esm2022/app/table/table.body.component.mjs +0 -181
  46. package/esm2022/app/table/table.cell.component.mjs +0 -75
  47. package/esm2022/app/table/table.component.mjs +0 -773
  48. package/esm2022/app/table/table.footer.component.mjs +0 -176
  49. package/esm2022/app/table/table.header.component.mjs +0 -204
  50. package/esm2022/app/table/table.info.header.component.mjs +0 -142
  51. package/esm2022/app/table/table.module.mjs +0 -73
  52. package/esm2022/app/table/table.pagination.component.mjs +0 -134
  53. package/esm2022/app/table/table.utils.mjs +0 -72
  54. package/esm2022/public_api.mjs +0 -2
  55. package/esm2022/shark-ng-table.mjs +0 -5
  56. package/index.d.ts +0 -5
  57. package/public_api.d.ts +0 -1
package/README.md CHANGED
@@ -1,76 +1,90 @@
1
1
  # shark-ng-table
2
2
 
3
- ![Build Status](https://github.com/github/docs/actions/workflows/node.js.yml/badge.svg)
4
- [![Coverage Status](https://coveralls.io/repos/github/Quantas/shark-ng-table/badge.svg?branch=master)](https://coveralls.io/github/Quantas/shark-ng-table?branch=master)
5
- [![Known Vulnerabilities](https://snyk.io/test/github/Quantas/shark-ng-table/badge.svg)](https://snyk.io/test/github/Quantas/shark-ng-table)
6
-
7
- [![npm version](https://badge.fury.io/js/shark-ng-table.svg)][npm-badge-url]
8
- [![npm](https://img.shields.io/npm/l/shark-ng-table.svg)][npm-badge-url]
9
- [![npm](https://img.shields.io/npm/dm/shark-ng-table.svg)][npm-badge-url]
3
+ [![CI](https://github.com/sharkops-io/shark-ng-table/actions/workflows/ci.yml/badge.svg)](https://github.com/sharkops-io/shark-ng-table/actions/workflows/ci.yml)
4
+ [![npm version](https://img.shields.io/npm/v/shark-ng-table.svg)][npm-badge-url]
5
+ [![npm license](https://img.shields.io/npm/l/shark-ng-table.svg)][npm-badge-url]
6
+ [![npm downloads](https://img.shields.io/npm/dm/shark-ng-table.svg)][npm-badge-url]
10
7
 
11
8
  [npm-badge-url]: https://www.npmjs.com/package/shark-ng-table
12
9
 
13
- A robust table for Angular built with Accessibility in mind.
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
- | Angular Version | shark-ng-table Version |
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
- ## Samples
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
- We also have a running example over on [Stackblitz](https://stackblitz.com/edit/shark-ng-table-demo)
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
- ## Features
25
+ ## Versions
31
26
 
32
- - Filtering (Global and Column Specific)
33
- - Sorting
34
- - Pagination
35
- - Footer Headers
36
- - Informational Footer
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
- ## Installing
33
+ ## Install
42
34
 
43
35
  ```bash
44
- npm install --save shark-ng-table
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
- This will install the latest version of `shark-ng-table`.
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
- - [Setup <shark-table>](usage/setup.md)
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
- ## Dev Environment
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
- shark-ng-table also provides a `.devcontainer` folder for support of Visual Studio Code's Remote-Container support. This will setup a full shark-ng-table dev
62
- environment automatically. You should be able to run `npm run start` inside the dev enviornment and expose the port, 4200, and be able to do live development
63
- on the table.
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
- ## Publishing a new version
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`
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
- - Developed and tested in collaboration with Great Lakes Higher Education Corporation and Nelnet Inc. and Affiliates
76
- - We use the classes provided by [Font Awesome](https://fontawesome.com/) to add icons to a few parts of the table, their License is [here](https://fontawesome.com/license).
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)