snap-records 1.1.6 → 1.1.8
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/CONTRIBUTING.md +31 -0
- package/README.md +5 -5
- package/package.json +1 -6
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Contributing to SnapRecords
|
|
2
|
+
|
|
3
|
+
> By participating in this project, you agree to abide by its [Code of Conduct](./docs/COC.md).
|
|
4
|
+
|
|
5
|
+
First off, thank you for considering contributing to SnapRecords! It's people like you that make open source such a great community.
|
|
6
|
+
|
|
7
|
+
## How Can I Contribute?
|
|
8
|
+
|
|
9
|
+
### Reporting Bugs
|
|
10
|
+
|
|
11
|
+
- Ensure the bug was not already reported by searching on GitHub under [Issues](https://github.com/your-username/snap-records/issues).
|
|
12
|
+
- If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/your-username/snap-records/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.
|
|
13
|
+
|
|
14
|
+
### Suggesting Enhancements
|
|
15
|
+
|
|
16
|
+
- Open a new issue to suggest an enhancement. Please provide a clear description of the enhancement and its potential benefits.
|
|
17
|
+
|
|
18
|
+
### Pull Request Process
|
|
19
|
+
|
|
20
|
+
1. Fork the repo and create your branch from `main`.
|
|
21
|
+
2. If you've added code that should be tested, add tests.
|
|
22
|
+
3. If you've changed APIs, update the documentation.
|
|
23
|
+
4. Ensure the test suite passes (`npm test`).
|
|
24
|
+
5. Make sure your code lints (`npm run lint`).
|
|
25
|
+
6. Issue that pull request!
|
|
26
|
+
|
|
27
|
+
We will review your pull request as soon as possible.
|
|
28
|
+
|
|
29
|
+
## Code of Conduct
|
|
30
|
+
|
|
31
|
+
This project and everyone participating in it is governed by the [SnapRecords Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
**SnapRecords** is a powerful, flexible TypeScript-based data grid component for displaying, managing, and interacting with tabular data in web applications.
|
|
27
27
|
|
|
28
|
-
Inspired by
|
|
28
|
+
Inspired by <a href="https://github.com/alfajango/jquery-dynatable" target="_blank" rel="noopener noreferrer">jQuery Dynatable</a>, it modernizes the concept with type safety, enhanced features, and performance optimizations.
|
|
29
29
|
|
|
30
30
|
It supports server-side pagination, sorting, filtering, caching, multiple rendering modes, and accessibility, making it ideal for both simple and complex data-driven interfaces.
|
|
31
31
|
|
|
@@ -65,7 +65,7 @@ To quickly set up SnapRecords:
|
|
|
65
65
|
import { SnapRecords, RowsPerPage } from './SnapRecords';
|
|
66
66
|
|
|
67
67
|
new SnapRecords('table-container', {
|
|
68
|
-
url: '
|
|
68
|
+
url: 'https://api.example.com/data',
|
|
69
69
|
columns: ['id', 'name'],
|
|
70
70
|
rowsPerPage: RowsPerPage.DEFAULT,
|
|
71
71
|
// No theme specified, so it uses 'default' and inherits host page styles
|
|
@@ -234,7 +234,7 @@ api.setRenderMode(RenderType.MOBILE_CARDS);
|
|
|
234
234
|
|
|
235
235
|
## Configuration Options
|
|
236
236
|
|
|
237
|
-
The `SnapRecordsOptions<T>` interface defines all configuration options. Key options include (see
|
|
237
|
+
The `SnapRecordsOptions<T>` interface defines all configuration options. Key options include (see <a href="https://github.com/lbassuncao/SnapRecords/blob/main/docs/CONFIG.md" target="_blank" rel="noopener noreferrer">config.md</a> for full details):
|
|
238
238
|
|
|
239
239
|
- `url` (string, required): API URL for data fetching.
|
|
240
240
|
- `columns` (string[], required): Column keys to display.
|
|
@@ -311,7 +311,7 @@ Override styles in your CSS as needed.
|
|
|
311
311
|
SnapRecords prioritizes accessibility:
|
|
312
312
|
|
|
313
313
|
- **ARIA Attributes**: Supports `aria-sort`, `aria-selected`, `aria-label` for table, list, and card modes.
|
|
314
|
-
- **Keyboard Navigation**: ArrowUp/Down for row navigation, Enter/Space for selection, PageUp/Down for pagination (see
|
|
314
|
+
- **Keyboard Navigation**: ArrowUp/Down for row navigation, Enter/Space for selection, PageUp/Down for pagination (see <a href="https://github.com/lbassuncao/SnapRecords/blob/main/docs/KEYBOARD.md" target="_blank" rel="noopener noreferrer">keyboard.md</a>).
|
|
315
315
|
- **Screen Reader Support**: Announces updates (e.g., row selection, mode changes) via ARIA live regions.
|
|
316
316
|
|
|
317
317
|
## State Management
|
|
@@ -464,7 +464,7 @@ Customize rendering or event handling by providing custom `renderer`, `eventMana
|
|
|
464
464
|
|
|
465
465
|
## License
|
|
466
466
|
|
|
467
|
-
MIT License. See
|
|
467
|
+
MIT License. See <a href="https://github.com/lbassuncao/SnapRecords/blob/main/LICENSE" target="_blank" rel="noopener noreferrer">LICENSE</a> for details.
|
|
468
468
|
|
|
469
469
|
## Support
|
|
470
470
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"files": [
|
|
3
|
-
"dist",
|
|
4
|
-
"LICENSE",
|
|
5
|
-
"README.md"
|
|
6
|
-
],
|
|
7
2
|
"keywords": [
|
|
8
3
|
"datatable",
|
|
9
4
|
"data-grid",
|
|
@@ -22,7 +17,7 @@
|
|
|
22
17
|
"jquery-dynatable"
|
|
23
18
|
],
|
|
24
19
|
"type": "module",
|
|
25
|
-
"version": "1.1.
|
|
20
|
+
"version": "1.1.8",
|
|
26
21
|
"name": "snap-records",
|
|
27
22
|
"dependencies": {
|
|
28
23
|
"dexie": "^4.0.11",
|