bways-grid 0.0.5
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 +76 -0
- package/fesm2022/bways-grid.mjs +3440 -0
- package/fesm2022/bways-grid.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/bways-grid.module.d.ts +13 -0
- package/lib/components/cell/cell.component.d.ts +20 -0
- package/lib/components/choose-columns/choose-columns.component.d.ts +17 -0
- package/lib/components/column-tool-panel/column-tool-panel.component.d.ts +36 -0
- package/lib/components/filter-tool-panel/filter-tool-panel.component.d.ts +63 -0
- package/lib/components/header/header.component.d.ts +42 -0
- package/lib/components/header-filter/header-filter.component.d.ts +31 -0
- package/lib/components/header-menu/header-menu.component.d.ts +41 -0
- package/lib/components/pagination/pagination.component.d.ts +22 -0
- package/lib/components/row/row.component.d.ts +19 -0
- package/lib/components/side-bar/side-bar.component.d.ts +42 -0
- package/lib/components/ultra-grid/ultra-grid.component.d.ts +155 -0
- package/lib/core/grid-engine.service.d.ts +14 -0
- package/lib/core/grid-flattener.service.d.ts +8 -0
- package/lib/core/row-cache.d.ts +10 -0
- package/lib/core/viewport-manager.d.ts +21 -0
- package/lib/datasources/infinite-scroll.datasource.d.ts +17 -0
- package/lib/datasources/server-datasource.interface.d.ts +14 -0
- package/lib/directives/column-resize.directive.d.ts +18 -0
- package/lib/models/column.model.d.ts +21 -0
- package/lib/models/csv-export.model.d.ts +12 -0
- package/lib/models/filter.model.d.ts +18 -0
- package/lib/models/grid-config.model.d.ts +11 -0
- package/lib/models/row.model.d.ts +26 -0
- package/lib/services/csv-export.service.d.ts +11 -0
- package/lib/workers/generated/export.worker.code.d.ts +1 -0
- package/lib/workers/generated/sorting.worker.code.d.ts +1 -0
- package/package.json +23 -0
- package/public-api.d.ts +19 -0
- package/src/lib/workers/export.worker.ts +110 -0
- package/src/lib/workers/generated/export.worker.code.ts +7 -0
- package/src/lib/workers/generated/sorting.worker.code.ts +4 -0
- package/src/lib/workers/sorting.worker.ts +423 -0
package/README.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# bways-grid
|
|
2
|
+
|
|
3
|
+
A highly optimized, extreme scale enterprise Angular Data Grid clone designed for rendering 1,000,000+ rows smoothly with Server-Side-Rendering (SSR) support. Built completely from scratch using Angular CDK.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
- **Extreme Scale Engine**: Smoothly renders 1,000,000+ rows with minimal memory usage.
|
|
7
|
+
- **SSR Ready**: Strict platform checks for seamless Angular Universal integration.
|
|
8
|
+
- **Server DataSource API**: Support for infinite scroll, data chunking, and server-side pagination.
|
|
9
|
+
- **Professional Features**: Column resize, CDK DragDrop column reorder, multi-column sorting via Web Workers, row selection.
|
|
10
|
+
- **Theming**: Ships with an `ag-theme-alpine` equivalent style out of the box.
|
|
11
|
+
- **Web Workers First**: Heavy computing like massive Array sorting is automatically offloaded via Web Workers.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
\`\`\`bash
|
|
15
|
+
npm install bways-grid @angular/cdk
|
|
16
|
+
\`\`\`
|
|
17
|
+
|
|
18
|
+
## Quick Start
|
|
19
|
+
Import the module or standalone component:
|
|
20
|
+
\`\`\`typescript
|
|
21
|
+
import { BwaysGridModule, UltraGridColumn } from 'bways-grid';
|
|
22
|
+
|
|
23
|
+
@Component({
|
|
24
|
+
standalone: true,
|
|
25
|
+
imports: [BwaysGridModule],
|
|
26
|
+
template: \`
|
|
27
|
+
<div style="height: 600px;">
|
|
28
|
+
<bways-grid
|
|
29
|
+
[columns]="columns"
|
|
30
|
+
[rowData]="rowData">
|
|
31
|
+
</bways-grid>
|
|
32
|
+
</div>
|
|
33
|
+
\`
|
|
34
|
+
})
|
|
35
|
+
export class AppComponent {
|
|
36
|
+
columns: UltraGridColumn[] = [
|
|
37
|
+
{ field: 'id', headerName: 'ID' },
|
|
38
|
+
{ field: 'name', headerName: 'Name' }
|
|
39
|
+
];
|
|
40
|
+
rowData = Array.from({ length: 10000 }).map((_, i) => ({ id: i, name: \`User \${i}\` }));
|
|
41
|
+
}
|
|
42
|
+
\`\`\`
|
|
43
|
+
|
|
44
|
+
## Publishing to NPM
|
|
45
|
+
\`\`\`bash
|
|
46
|
+
# Build the library (outputs to dist/bways-grid)
|
|
47
|
+
ng build bways-grid
|
|
48
|
+
|
|
49
|
+
# Publish
|
|
50
|
+
cd dist/bways-grid
|
|
51
|
+
npm login
|
|
52
|
+
npm publish --access public
|
|
53
|
+
\`\`\`
|
|
54
|
+
|
|
55
|
+
## Server Data Source Example
|
|
56
|
+
\`\`\`typescript
|
|
57
|
+
export class AppComponent implements OnInit {
|
|
58
|
+
serverDataSource: ServerDataSource;
|
|
59
|
+
|
|
60
|
+
ngOnInit() {
|
|
61
|
+
this.serverDataSource = {
|
|
62
|
+
getRows: (params: GetRowsParams) => {
|
|
63
|
+
// Fetch rows remotely based on params.startRow and params.endRow
|
|
64
|
+
return this.http.get<ServerResponse>(...);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
\`\`\`
|
|
70
|
+
Template:
|
|
71
|
+
\`\`\`html
|
|
72
|
+
<bways-grid
|
|
73
|
+
[columns]="columns"
|
|
74
|
+
[serverDataSource]="serverDataSource">
|
|
75
|
+
</bways-grid>
|
|
76
|
+
\`\`\`
|