photon-grid-vue 1.0.0 → 1.0.2
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 +150 -15
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,32 +1,99 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Photon Grid for Vue
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/abdulwahid-csit/photon-grid/main/assets/logo.svg" alt="Photon Grid — Vue 3 Data Grid" width="180"/>
|
|
5
|
+
</p>
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<strong>A high-performance, enterprise-grade Vue 3 data grid built on the zero-dependency Photon Grid engine.</strong>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+

|
|
15
|
+

|
|
16
|
+

|
|
17
|
+
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Overview
|
|
23
|
+
|
|
24
|
+
**Photon Grid for Vue** (`photon-grid-vue`) is the official Vue 3 wrapper for [Photon Grid Core](https://www.npmjs.com/package/photon-grid-core) — an extremely fast, framework-agnostic TypeScript data grid.
|
|
25
|
+
|
|
26
|
+
It exposes a single `<PhotonGrid />` component that binds Vue props and emits to the core engine, giving you virtual scrolling, sorting, filtering, grouping, editing, and custom cell renderers with **zero framework lock-in**.
|
|
27
|
+
|
|
28
|
+
A modern, lightweight alternative to AG Grid, Handsontable, and vue-good-table for Vue 3 applications.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Features
|
|
33
|
+
|
|
34
|
+
- Single declarative Vue 3 component (`<PhotonGrid />`)
|
|
35
|
+
- Fully typed props and emitted events
|
|
36
|
+
- Composition API friendly (`<script setup>`)
|
|
37
|
+
- Zero runtime dependencies in the core engine
|
|
38
|
+
- Virtual scrolling and virtual columns
|
|
39
|
+
- Millions of rows support
|
|
40
|
+
- Column pinning, resizing, moving, and auto-size
|
|
41
|
+
- Cell selection and range selection
|
|
42
|
+
- Clipboard support (copy / paste)
|
|
43
|
+
- Keyboard and mouse navigation
|
|
44
|
+
- Tree data and row grouping
|
|
45
|
+
- Sorting and multi-column sorting
|
|
46
|
+
- Filtering and quick filtering
|
|
47
|
+
- Custom cell and header renderers
|
|
48
|
+
- Context menu and custom context menus
|
|
49
|
+
- Pagination, status bar, and tool panels
|
|
50
|
+
- Theme support (light, dark, custom)
|
|
51
|
+
- Event-driven, API-driven architecture
|
|
52
|
+
- High-FPS, memory-efficient rendering
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Installation
|
|
7
57
|
|
|
8
58
|
```bash
|
|
9
59
|
npm install photon-grid-vue photon-grid-core vue
|
|
10
60
|
```
|
|
11
61
|
|
|
12
|
-
|
|
62
|
+
or
|
|
13
63
|
|
|
14
|
-
|
|
64
|
+
```bash
|
|
65
|
+
yarn add photon-grid-vue photon-grid-core vue
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
or
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pnpm add photon-grid-vue photon-grid-core vue
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
`vue` (>= 3.4) and `photon-grid-core` are peer dependencies.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Basic Usage
|
|
15
79
|
|
|
16
80
|
```vue
|
|
17
81
|
<script setup lang="ts">
|
|
18
82
|
import { PhotonGrid } from 'photon-grid-vue';
|
|
19
83
|
import type { ColumnDef, GridApi } from 'photon-grid-vue';
|
|
20
|
-
import 'photon-grid-core/styles/photon-grid.css';
|
|
21
84
|
|
|
22
85
|
const columns: ColumnDef[] = [
|
|
23
86
|
{ colId: 'name', field: 'name', header: 'Name', type: 'string' },
|
|
24
87
|
{ colId: 'age', field: 'age', header: 'Age', type: 'number' },
|
|
25
88
|
];
|
|
26
|
-
|
|
89
|
+
|
|
90
|
+
const rows = [
|
|
91
|
+
{ name: 'Ada', age: 36 },
|
|
92
|
+
{ name: 'Alan', age: 41 },
|
|
93
|
+
];
|
|
27
94
|
|
|
28
95
|
function onReady(api: GridApi) {
|
|
29
|
-
console.log('rows:', api.getVisibleRows().length);
|
|
96
|
+
console.log('visible rows:', api.getVisibleRows().length);
|
|
30
97
|
}
|
|
31
98
|
</script>
|
|
32
99
|
|
|
@@ -41,13 +108,19 @@ function onReady(api: GridApi) {
|
|
|
41
108
|
</template>
|
|
42
109
|
```
|
|
43
110
|
|
|
111
|
+
> **Styling** is injected automatically by the core engine — no CSS import is required.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
44
115
|
## Props
|
|
45
116
|
|
|
46
|
-
| Prop | Type | Description
|
|
47
|
-
| --------- | --------------------------- |
|
|
48
|
-
| `columns` | `ColumnDef[]` | Column definitions.
|
|
49
|
-
| `dataSet` | `Record<string, unknown>[]` | Row data.
|
|
50
|
-
| `options` | `Partial<GridOptions>` | Theme, selection, and feature flags. |
|
|
117
|
+
| Prop | Type | Description |
|
|
118
|
+
| --------- | --------------------------- | ------------------------------------------------------ |
|
|
119
|
+
| `columns` | `ColumnDef[]` | Column definitions. |
|
|
120
|
+
| `dataSet` | `Record<string, unknown>[]` | Row data. |
|
|
121
|
+
| `options` | `Partial<GridOptions>` | Theme, selection, editing, pagination, and feature flags. |
|
|
122
|
+
|
|
123
|
+
---
|
|
51
124
|
|
|
52
125
|
## Events
|
|
53
126
|
|
|
@@ -56,6 +129,68 @@ function onReady(api: GridApi) {
|
|
|
56
129
|
`columnResized`, `columnMoved`, `sortChanged`, `filterChanged`, `pageChanged`,
|
|
57
130
|
`columnsStateChanged`, `themeChanged`, `exportComplete`.
|
|
58
131
|
|
|
132
|
+
`gridReady` emits the `GridApi`, giving you full programmatic control over the grid.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Why Photon Grid?
|
|
137
|
+
|
|
138
|
+
- Declarative, idiomatic Vue 3 API
|
|
139
|
+
- Fast, virtualized rendering for millions of rows
|
|
140
|
+
- Framework-independent core — share grid logic across Vue, React, and Angular
|
|
141
|
+
- Modular, extensible, plugin-friendly architecture
|
|
142
|
+
- Enterprise capabilities with a simple, predictable API
|
|
143
|
+
- Fully typed with built-in declaration files
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Browser Support
|
|
148
|
+
|
|
149
|
+
Supports all modern browsers: Chrome, Edge, Firefox, and Safari.
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## TypeScript
|
|
154
|
+
|
|
155
|
+
`photon-grid-vue` is written in TypeScript and ships with built-in declaration files. No additional typings are required.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Ecosystem
|
|
160
|
+
|
|
161
|
+
| Package | Description |
|
|
162
|
+
| ------- | ----------- |
|
|
163
|
+
| [`photon-grid-core`](https://www.npmjs.com/package/photon-grid-core) | Framework-agnostic engine |
|
|
164
|
+
| [`photon-grid-vue`](https://www.npmjs.com/package/photon-grid-vue) | Vue 3 wrapper (this package) |
|
|
165
|
+
| [`photon-grid-angular`](https://www.npmjs.com/package/photon-grid-angular) | Angular wrapper |
|
|
166
|
+
| [`photon-grid-react`](https://www.npmjs.com/package/photon-grid-react) | React wrapper |
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Contributing
|
|
171
|
+
|
|
172
|
+
Contributions are welcome. Please submit issues, feature requests, or pull requests through GitHub.
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
59
176
|
## License
|
|
60
177
|
|
|
61
|
-
MIT
|
|
178
|
+
MIT License
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Author
|
|
183
|
+
|
|
184
|
+
**Abdul Wahid**
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Links
|
|
189
|
+
|
|
190
|
+
- **GitHub** — https://github.com/abdulwahid-csit/photon-grid
|
|
191
|
+
- **Issues** — https://github.com/abdulwahid-csit/photon-grid/issues
|
|
192
|
+
- **NPM** — https://www.npmjs.com/package/photon-grid-vue
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
⭐ If you find Photon Grid useful, consider starring the repository.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "photon-grid-vue",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Vue 3 wrapper for Photon Grid — an enterprise-grade, framework-agnostic TypeScript data grid.",
|
|
5
5
|
"author": "Abdul Wahid",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
],
|
|
22
22
|
"sideEffects": false,
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"photon-grid-core": "^1.0.
|
|
24
|
+
"photon-grid-core": "^1.0.2",
|
|
25
25
|
"vue": "^3.4.0"
|
|
26
26
|
},
|
|
27
27
|
"keywords": [
|