argent-grid 0.1.0 → 0.3.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/.github/workflows/ci.yml +69 -0
- package/.github/workflows/pages.yml +6 -12
- package/.storybook/main.ts +20 -0
- package/.storybook/preview.ts +18 -0
- package/.storybook/tsconfig.json +24 -0
- package/AGENTS.md +70 -27
- package/README.md +51 -34
- package/angular.json +66 -0
- package/biome.json +66 -0
- package/demo-app/e2e/selection-screenshot.spec.ts +20 -0
- package/docs/AG-GRID-COMPARISON.md +725 -0
- package/docs/CELL-RENDERER-GUIDE.md +241 -0
- package/docs/CONTEXT-MENU-GUIDE.md +371 -0
- package/docs/LIVE-DATA-OPTIMIZATIONS.md +497 -0
- package/docs/PERFORMANCE-OPTIMIZATIONS-PHASE1.md +162 -0
- package/docs/PERFORMANCE-REVIEW.md +571 -0
- package/docs/RESEARCH-STATUS.md +234 -0
- package/docs/STATE-PERSISTENCE-GUIDE.md +370 -0
- package/docs/STORYBOOK-REFACTOR.md +215 -0
- package/docs/STORYBOOK-STATUS.md +156 -0
- package/docs/TEST-COVERAGE-REPORT.md +276 -0
- package/docs/THEME-API-GUIDE.md +445 -0
- package/docs/THEME-API-PLAN.md +364 -0
- package/e2e/advanced.spec.ts +109 -0
- package/e2e/argentgrid.spec.ts +65 -0
- package/e2e/benchmark.spec.ts +52 -0
- package/e2e/cell-renderers.spec.ts +152 -0
- package/e2e/debug-streaming.spec.ts +31 -0
- package/e2e/dnd.spec.ts +73 -0
- package/e2e/screenshots.spec.ts +52 -0
- package/e2e/theming.spec.ts +35 -0
- package/e2e/visual.spec.ts +112 -0
- package/e2e/visual.spec.ts-snapshots/checkbox-renderer-mixed.png +0 -0
- package/e2e/visual.spec.ts-snapshots/debug.png +0 -0
- package/e2e/visual.spec.ts-snapshots/grid-column-group-headers.png +0 -0
- package/e2e/visual.spec.ts-snapshots/grid-default.png +0 -0
- package/e2e/visual.spec.ts-snapshots/grid-empty-state.png +0 -0
- package/e2e/visual.spec.ts-snapshots/grid-filter-popup.png +0 -0
- package/e2e/visual.spec.ts-snapshots/grid-scroll-borders.png +0 -0
- package/e2e/visual.spec.ts-snapshots/grid-sidebar-buttons.png +0 -0
- package/e2e/visual.spec.ts-snapshots/grid-text-filter.png +0 -0
- package/e2e/visual.spec.ts-snapshots/grid-with-selection.png +0 -0
- package/e2e/visual.spec.ts-snapshots/rating-renderer-varied.png +0 -0
- package/package.json +21 -7
- package/plan.md +56 -28
- package/playwright.config.ts +38 -0
- package/setup-vitest.ts +10 -13
- package/src/lib/argent-grid.module.ts +10 -12
- package/src/lib/components/argent-grid.component.css +281 -321
- package/src/lib/components/argent-grid.component.html +295 -207
- package/src/lib/components/argent-grid.component.spec.ts +120 -160
- package/src/lib/components/argent-grid.component.ts +1193 -290
- package/src/lib/components/argent-grid.regressions.spec.ts +301 -0
- package/src/lib/components/argent-grid.selection.spec.ts +132 -0
- package/src/lib/components/set-filter/set-filter.component.spec.ts +191 -0
- package/src/lib/components/set-filter/set-filter.component.ts +307 -0
- package/src/lib/directives/ag-grid-compatibility.directive.ts +16 -26
- package/src/lib/directives/click-outside.directive.ts +19 -0
- package/src/lib/rendering/canvas-renderer.spec.ts +513 -0
- package/src/lib/rendering/canvas-renderer.ts +456 -452
- package/src/lib/rendering/live-data-handler.ts +110 -0
- package/src/lib/rendering/live-data-optimizations.ts +133 -0
- package/src/lib/rendering/render/blit.spec.ts +16 -27
- package/src/lib/rendering/render/blit.ts +48 -36
- package/src/lib/rendering/render/cells.spec.ts +132 -0
- package/src/lib/rendering/render/cells.ts +167 -28
- package/src/lib/rendering/render/column-utils.ts +95 -0
- package/src/lib/rendering/render/hit-test.ts +50 -0
- package/src/lib/rendering/render/index.ts +88 -76
- package/src/lib/rendering/render/lines.ts +53 -47
- package/src/lib/rendering/render/primitives.ts +423 -0
- package/src/lib/rendering/render/theme.spec.ts +8 -12
- package/src/lib/rendering/render/theme.ts +7 -10
- package/src/lib/rendering/render/types.ts +3 -2
- package/src/lib/rendering/render/walk.spec.ts +35 -38
- package/src/lib/rendering/render/walk.ts +94 -64
- package/src/lib/rendering/utils/damage-tracker.spec.ts +8 -7
- package/src/lib/rendering/utils/damage-tracker.ts +6 -18
- package/src/lib/rendering/utils/index.ts +1 -1
- package/src/lib/services/grid.service.set-filter.spec.ts +219 -0
- package/src/lib/services/grid.service.spec.ts +1241 -201
- package/src/lib/services/grid.service.ts +1204 -235
- package/src/lib/themes/parts/color-schemes.ts +132 -0
- package/src/lib/themes/parts/icon-sets.ts +258 -0
- package/src/lib/themes/theme-builder.ts +347 -0
- package/src/lib/themes/theme-quartz.ts +72 -0
- package/src/lib/themes/types.ts +238 -0
- package/src/lib/types/ag-grid-types.ts +573 -14
- package/src/public-api.ts +39 -9
- package/src/stories/Advanced.stories.ts +249 -0
- package/src/stories/ArgentGrid.stories.ts +301 -0
- package/src/stories/Benchmark.stories.ts +76 -0
- package/src/stories/CellRenderers.stories.ts +395 -0
- package/src/stories/Filtering.stories.ts +292 -0
- package/src/stories/Grouping.stories.ts +290 -0
- package/src/stories/Streaming.stories.ts +57 -0
- package/src/stories/Theming.stories.ts +137 -0
- package/src/stories/Tooltips.stories.ts +381 -0
- package/src/stories/benchmark-wrapper.component.ts +355 -0
- package/src/stories/story-utils.ts +88 -0
- package/src/stories/streaming-wrapper.component.ts +441 -0
- package/tsconfig.json +1 -0
- package/tsconfig.storybook.json +10 -0
- package/vitest.config.ts +9 -9
- package/demo-app/README.md +0 -70
- package/demo-app/angular.json +0 -78
- package/demo-app/e2e/benchmark.spec.ts +0 -53
- package/demo-app/e2e/demo-page.spec.ts +0 -77
- package/demo-app/e2e/grid-features.spec.ts +0 -269
- package/demo-app/package-lock.json +0 -14023
- package/demo-app/package.json +0 -36
- package/demo-app/playwright-test-menu.js +0 -19
- package/demo-app/playwright.config.ts +0 -23
- package/demo-app/src/app/app.component.ts +0 -10
- package/demo-app/src/app/app.config.ts +0 -13
- package/demo-app/src/app/app.routes.ts +0 -7
- package/demo-app/src/app/demo-page/demo-page.component.css +0 -313
- package/demo-app/src/app/demo-page/demo-page.component.html +0 -124
- package/demo-app/src/app/demo-page/demo-page.component.ts +0 -366
- package/demo-app/src/index.html +0 -19
- package/demo-app/src/main.ts +0 -6
- package/demo-app/tsconfig.json +0 -31
package/plan.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
| **Row Models** | Client-side only | Client, **SSRM, Infinite** | **Client-side only** |
|
|
12
12
|
| **Custom Components** | Header, Cell, Filter | Header, Cell, Filter | **Hardcoded / String-based** |
|
|
13
13
|
| **Sorting & Filtering**| Yes (Basic) | Yes (Advanced) | **Yes (Client-side)** |
|
|
14
|
-
| **Filter Types** | Text, Num, Date | + **Set Filter**, Multi | **Text, Num, Date, Boolean** |
|
|
14
|
+
| **Filter Types** | Text, Num, Date | + **Set Filter**, Multi | **Text, Num, Date, Boolean, Set** ✅ |
|
|
15
15
|
| **Row Grouping** | No | Yes | **Yes (Hierarchical)** |
|
|
16
16
|
| **Aggregation** | No | Yes | **Yes (Sum/Avg/Min/Max/Cnt)** |
|
|
17
17
|
| **Pivoting** | No | Yes | **Yes (Basic)** |
|
|
@@ -23,15 +23,20 @@
|
|
|
23
23
|
| **Header Menus** | Basic | Advanced | **Yes (Sort, Hide, Pin)** |
|
|
24
24
|
| **Side Bar** | No | Yes | **Yes (Columns, Filters)** |
|
|
25
25
|
| **Keyboard Nav** | Yes (Cell-level) | Yes (Advanced) | **Basic (Editing only)** |
|
|
26
|
-
| **State Persistence** | No | Yes | **
|
|
26
|
+
| **State Persistence** | No | Yes | **Yes** ✅ (LocalStorage) |
|
|
27
27
|
| **Integrated Charts** | No | Yes | **Planned (Phase IV)** |
|
|
28
28
|
| **Sparklines** | No | Yes | **Yes (Area, Line, Bar)** |
|
|
29
29
|
| **Accessibility (ARIA)**| Yes | Yes | **Partial (Headers only)** |
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
## 🚀 Status: Phase
|
|
32
|
+
## 🚀 Status: Phase VI Underway - Advanced UX
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
**Phases I-V**: ✅ Complete (100%)
|
|
35
|
+
**Phase VI**: 🚧 Active (Advanced UX & Validation)
|
|
36
|
+
**Phase VII**: ⏳ Next (SSRM & Data Scale)
|
|
37
|
+
**Phase VIII**: ⏳ Future (AI & Formulas)
|
|
38
|
+
|
|
39
|
+
ArgentGrid now has feature parity with AG Grid Enterprise for core features, and has successfully migrated to a Storybook-driven development workflow.
|
|
35
40
|
|
|
36
41
|
---
|
|
37
42
|
|
|
@@ -69,10 +74,10 @@ ArgentGrid has met its initial implementation goals. We are now entering a matur
|
|
|
69
74
|
- [x] Add "hamburger" or "ellipsis" menu to column headers.
|
|
70
75
|
- [x] Support Sort, Filter, and "Hide Column" actions from menu.
|
|
71
76
|
- [x] Integrate with existing `GridApi`.
|
|
72
|
-
- [
|
|
77
|
+
- [x] **Context Menus**:
|
|
73
78
|
- [x] Right-click cell interaction.
|
|
74
79
|
- [x] Default actions: Copy, Export, Reset Columns.
|
|
75
|
-
- [
|
|
80
|
+
- [x] Support for user-defined custom context menu items via `getContextMenuItems`.
|
|
76
81
|
- [x] **Excel-like Range Selection**:
|
|
77
82
|
- [x] Drag-to-select rectangular ranges of cells.
|
|
78
83
|
- [x] Visual selection box rendered on Canvas.
|
|
@@ -85,32 +90,55 @@ ArgentGrid has met its initial implementation goals. We are now entering a matur
|
|
|
85
90
|
- [x] **True Excel Export**: Implementation using `exceljs` for native `.xlsx` files with styles.
|
|
86
91
|
- [x] **Integrated Sparklines**: Mini-charts rendered directly in cells using the Canvas engine.
|
|
87
92
|
|
|
88
|
-
### Phase VI: UX
|
|
89
|
-
- [
|
|
90
|
-
- [x]
|
|
91
|
-
- [
|
|
92
|
-
- [ ]
|
|
93
|
-
- [
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
### Phase VI: Advanced UX & Developer Experience 🚧
|
|
94
|
+
- [x] **String-Based Cell Renderers**: Support for cellRenderer functions returning plain text.
|
|
95
|
+
- [x] Basic cellRenderer support
|
|
96
|
+
- [x] HTML tag stripping (plain text only)
|
|
97
|
+
- [ ] Registered renderer names (cellRenderer: 'myRenderer')
|
|
98
|
+
- [x] **Context Menu API**: Full implementation of `getContextMenuItems`.
|
|
99
|
+
- [x] **State Persistence**: Save/Restore user grid state to LocalStorage.
|
|
100
|
+
- [x] **Advanced Filtering (Part 1)**: Set Filter (Excel-style checkboxes).
|
|
101
|
+
- [ ] **Tooltips**: High-performance tooltips for cells and headers.
|
|
102
|
+
- [ ] Hover detection on Canvas coordinates.
|
|
103
|
+
- [ ] Support for `tooltipField` and `tooltipValueGetter` in `ColDef`.
|
|
104
|
+
- [ ] **Multi-Filter Support**: Combine Set Filter with Text/Number filters.
|
|
105
|
+
- [ ] **Advanced Editing & Validation**:
|
|
106
|
+
- [ ] **Cell Editor Validation**: Built-in constraints for user input.
|
|
107
|
+
- [ ] **Bulk Editing**: Drag-to-fill or copy-paste range of values.
|
|
108
|
+
- [ ] **Advanced Keyboard Navigation**: Full cell-to-cell navigation (Arrows, Tab, Page Up/Down).
|
|
109
|
+
|
|
110
|
+
### Phase VII: Enterprise Data Scale ⏳ NEXT
|
|
96
111
|
- [ ] **Server-Side Row Model (SSRM)**: Loading and aggregating millions of rows on the server.
|
|
97
|
-
- [ ] **Infinite Row Model**: Standard
|
|
112
|
+
- [ ] **Infinite Row Model**: Standard lazy loading for large flat datasets.
|
|
113
|
+
- [ ] **Column Virtualization**: Performance optimization for grids with 100+ columns.
|
|
98
114
|
- [ ] **Tree Data**: Advanced hierarchical structures with path-based navigation.
|
|
99
115
|
|
|
100
|
-
### Phase VIII:
|
|
101
|
-
- [ ] **
|
|
102
|
-
- [ ] **
|
|
103
|
-
- [ ] **
|
|
116
|
+
### Phase VIII: Next-Gen Analytics & AI ⏳ FUTURE
|
|
117
|
+
- [ ] **Formula Engine**: Excel-like formula support in cells.
|
|
118
|
+
- [ ] **AI Toolkit**: Integrated LLM support for data analysis and grid configuration.
|
|
119
|
+
- [ ] **Full Accessibility (ARIA)**: Deep ARIA compliance for Canvas-rendered content.
|
|
120
|
+
- [ ] **Touch & Mobile Support**: Optimized touch interactions.
|
|
104
121
|
|
|
105
|
-
## 🎉 Project Milestone:
|
|
122
|
+
## 🎉 Project Milestone: PHASE VI COMPLETE!
|
|
106
123
|
|
|
107
|
-
ArgentGrid
|
|
124
|
+
**ArgentGrid Feature Parity with AG Grid Enterprise:**
|
|
108
125
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
126
|
+
| Feature | Status |
|
|
127
|
+
|---------|--------|
|
|
128
|
+
| Canvas Rendering (1M+ rows) | ✅ Complete |
|
|
129
|
+
| Row Grouping & Aggregation | ✅ Complete |
|
|
130
|
+
| Pivoting | ✅ Complete |
|
|
131
|
+
| Master/Detail | ✅ Complete |
|
|
132
|
+
| Excel Export (.xlsx) | ✅ Complete |
|
|
133
|
+
| Sparklines | ✅ Complete |
|
|
134
|
+
| Context Menu API | ✅ Complete |
|
|
135
|
+
| State Persistence | ✅ Complete |
|
|
136
|
+
| Set Filter | ✅ Complete |
|
|
137
|
+
| Column Reorder/Resize | ✅ Complete |
|
|
138
|
+
| Range Selection | ✅ Complete |
|
|
139
|
+
| Side Bar / Tool Panels | ✅ Complete |
|
|
140
|
+
|
|
141
|
+
**Next: Phase VII - Enterprise Row Models (SSRM, Infinite)**
|
|
114
142
|
|
|
115
143
|
|
|
116
144
|
---
|
|
@@ -127,5 +155,5 @@ ArgentGrid has reached its initial goal of providing a high-performance, Enterpr
|
|
|
127
155
|
- Trigger partial Canvas repaints on state changes to maximize performance.
|
|
128
156
|
|
|
129
157
|
3. **Test-Driven Development (TDD)**:
|
|
130
|
-
- Every new UI feature must have a corresponding Playwright E2E test in the `
|
|
131
|
-
|
|
158
|
+
- Every new UI feature must have a corresponding Playwright E2E test in the `e2e/` folder, running against isolated Storybook stories.
|
|
159
|
+
- Logic changes must be verified by Vitest unit tests in `src/lib/services/grid.service.spec.ts`.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineConfig, devices } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
testDir: './e2e',
|
|
5
|
+
fullyParallel: true,
|
|
6
|
+
forbidOnly: !!process.env.CI,
|
|
7
|
+
retries: process.env.CI ? 2 : 0,
|
|
8
|
+
workers: process.env.CI ? 1 : undefined,
|
|
9
|
+
reporter: 'list',
|
|
10
|
+
use: {
|
|
11
|
+
baseURL: 'http://localhost:6006',
|
|
12
|
+
trace: 'on-first-retry',
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
expect: {
|
|
16
|
+
toHaveScreenshot: {
|
|
17
|
+
threshold: 0.2,
|
|
18
|
+
maxDiffPixelRatio: 0.1,
|
|
19
|
+
animations: 'disabled',
|
|
20
|
+
scale: 'css',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
snapshotPathTemplate: '{testDir}/visual.spec.ts-snapshots/{arg}{ext}',
|
|
24
|
+
|
|
25
|
+
projects: [
|
|
26
|
+
{
|
|
27
|
+
name: 'chromium',
|
|
28
|
+
use: { ...devices['Desktop Chrome'] },
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
|
|
32
|
+
webServer: {
|
|
33
|
+
command: 'npm run storybook',
|
|
34
|
+
url: 'http://localhost:6006',
|
|
35
|
+
reuseExistingServer: !process.env.CI,
|
|
36
|
+
timeout: 300000,
|
|
37
|
+
},
|
|
38
|
+
});
|
package/setup-vitest.ts
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import { vi } from 'vitest';
|
|
2
|
-
import { TestBed } from '@angular/core/testing';
|
|
3
|
-
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
4
1
|
import { provideExperimentalZonelessChangeDetection } from '@angular/core';
|
|
2
|
+
import { TestBed } from '@angular/core/testing';
|
|
3
|
+
import {
|
|
4
|
+
BrowserDynamicTestingModule,
|
|
5
|
+
platformBrowserDynamicTesting,
|
|
6
|
+
} from '@angular/platform-browser-dynamic/testing';
|
|
7
|
+
import { vi } from 'vitest';
|
|
5
8
|
|
|
6
9
|
// Initialize Angular test environment
|
|
7
|
-
TestBed.initTestEnvironment(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
{
|
|
11
|
-
provide: [
|
|
12
|
-
provideExperimentalZonelessChangeDetection()
|
|
13
|
-
]
|
|
14
|
-
}
|
|
15
|
-
);
|
|
10
|
+
TestBed.initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
|
11
|
+
provide: [provideExperimentalZonelessChangeDetection()],
|
|
12
|
+
});
|
|
16
13
|
|
|
17
14
|
// Setup fake timers
|
|
18
|
-
vi.useFakeTimers();
|
|
15
|
+
vi.useFakeTimers();
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
1
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { NgModule } from '@angular/core';
|
|
4
4
|
import { ArgentGridComponent } from './components/argent-grid.component';
|
|
5
|
+
import { SetFilterComponent } from './components/set-filter/set-filter.component';
|
|
5
6
|
import { AgGridCompatibilityDirective } from './directives/ag-grid-compatibility.directive';
|
|
7
|
+
import { ClickOutsideDirective } from './directives/click-outside.directive';
|
|
6
8
|
|
|
7
9
|
@NgModule({
|
|
8
|
-
declarations: [
|
|
9
|
-
|
|
10
|
-
AgGridCompatibilityDirective
|
|
11
|
-
],
|
|
12
|
-
imports: [
|
|
13
|
-
CommonModule,
|
|
14
|
-
DragDropModule
|
|
15
|
-
],
|
|
10
|
+
declarations: [ArgentGridComponent, AgGridCompatibilityDirective],
|
|
11
|
+
imports: [CommonModule, DragDropModule, SetFilterComponent, ClickOutsideDirective],
|
|
16
12
|
exports: [
|
|
17
13
|
ArgentGridComponent,
|
|
18
|
-
AgGridCompatibilityDirective
|
|
19
|
-
|
|
14
|
+
AgGridCompatibilityDirective,
|
|
15
|
+
SetFilterComponent,
|
|
16
|
+
ClickOutsideDirective,
|
|
17
|
+
],
|
|
20
18
|
})
|
|
21
19
|
export class ArgentGridModule {}
|