@alaarab/ogrid-mcp 2.8.1 → 2.11.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 (51) hide show
  1. package/bundled-docs/api/README.md +7 -32
  2. package/bundled-docs/api/column-def.mdx +1 -1
  3. package/bundled-docs/api/components-column-chooser.mdx +0 -96
  4. package/bundled-docs/api/components-column-header-filter.mdx +1 -83
  5. package/bundled-docs/api/components-datagrid-table.mdx +0 -63
  6. package/bundled-docs/api/components-pagination-controls.mdx +0 -94
  7. package/bundled-docs/api/components-sidebar.mdx +0 -76
  8. package/bundled-docs/api/components-status-bar.mdx +0 -66
  9. package/bundled-docs/api/headless-hooks.mdx +410 -0
  10. package/bundled-docs/api/ogrid-props.mdx +1 -1
  11. package/bundled-docs/api/types.mdx +1 -1
  12. package/bundled-docs/features/cell-references.mdx +2 -116
  13. package/bundled-docs/features/column-chooser.mdx +0 -131
  14. package/bundled-docs/features/column-groups.mdx +1 -136
  15. package/bundled-docs/features/column-pinning.mdx +1 -108
  16. package/bundled-docs/features/column-reordering.mdx +1 -168
  17. package/bundled-docs/features/column-types.mdx +0 -71
  18. package/bundled-docs/features/context-menu.mdx +1 -93
  19. package/bundled-docs/features/csv-export.mdx +1 -104
  20. package/bundled-docs/features/editing.mdx +0 -149
  21. package/bundled-docs/features/filtering.mdx +0 -119
  22. package/bundled-docs/features/formulas.mdx +2 -102
  23. package/bundled-docs/features/grid-api.mdx +1 -108
  24. package/bundled-docs/features/keyboard-navigation.mdx +1 -74
  25. package/bundled-docs/features/mobile-touch.mdx +0 -71
  26. package/bundled-docs/features/pagination.mdx +0 -105
  27. package/bundled-docs/features/performance.mdx +0 -191
  28. package/bundled-docs/features/premium-inputs.mdx +0 -311
  29. package/bundled-docs/features/responsive-columns.mdx +1 -76
  30. package/bundled-docs/features/row-selection.mdx +2 -106
  31. package/bundled-docs/features/server-side-data.mdx +1 -129
  32. package/bundled-docs/features/sidebar.mdx +1 -78
  33. package/bundled-docs/features/sorting.mdx +2 -108
  34. package/bundled-docs/features/spreadsheet-selection.mdx +2 -79
  35. package/bundled-docs/features/status-bar.mdx +1 -72
  36. package/bundled-docs/features/toolbar.mdx +1 -75
  37. package/bundled-docs/features/virtual-scrolling.mdx +1 -304
  38. package/bundled-docs/getting-started/headless-or-component.mdx +112 -0
  39. package/bundled-docs/getting-started/installation.mdx +11 -141
  40. package/bundled-docs/getting-started/overview.mdx +15 -55
  41. package/bundled-docs/getting-started/quick-start.mdx +4 -279
  42. package/bundled-docs/guides/browser-support-matrix.mdx +6 -17
  43. package/bundled-docs/guides/mcp-live-testing.mdx +0 -82
  44. package/bundled-docs/guides/mcp.mdx +4 -4
  45. package/bundled-docs/guides/migration-from-ag-grid.mdx +2 -3
  46. package/bundled-docs/guides/theming.mdx +50 -23
  47. package/dist/esm/index.js +9 -39
  48. package/package.json +5 -5
  49. package/bundled-docs/api/js-api.mdx +0 -198
  50. package/bundled-docs/getting-started/vanilla-js.mdx +0 -218
  51. package/bundled-docs/guides/framework-showcase.mdx +0 -246
@@ -14,7 +14,7 @@ Group related columns under shared parent headers. OGrid supports arbitrarily ne
14
14
  <ColumnGroupsDemo />
15
15
 
16
16
  :::tip Try it in your framework
17
- The demo above uses Radix UI for styling. To see this feature with your framework's design system (Fluent UI, Material UI, Vuetify, PrimeNG, etc.), click **"Open in online demo"** below the demo.
17
+ The demo above uses Radix UI for styling. To see this feature with the Fluent UI implementation, click **"Open in online demo"** below the demo.
18
18
  :::
19
19
 
20
20
  ## Quick Example
@@ -75,143 +75,8 @@ The `OGrid` component has the same props across all React UI packages. To switch
75
75
 
76
76
  - **Radix** (lightweight, default): `from '@alaarab/ogrid-react-radix'`
77
77
  - **Fluent UI** (Microsoft 365 / SPFx): `from '@alaarab/ogrid-react-fluent'` - wrap in `<FluentProvider>`
78
- - **Material UI** (MUI v7): `from '@alaarab/ogrid-react-material'` - wrap in `<ThemeProvider>`
79
78
  :::
80
79
 
81
- </TabItem>
82
- <TabItem value="angular" label="Angular">
83
-
84
- ```typescript
85
-
86
- @Component({
87
- standalone: true,
88
- imports: [OGridComponent],
89
- template: `<ogrid [props]="gridProps" />`
90
- })
91
- export class GridComponent {
92
- gridProps = {
93
- columns: [
94
- {
95
- headerName: 'Personal Info',
96
- children: [
97
- { columnId: 'name', name: 'Name' },
98
- { columnId: 'age', name: 'Age', type: 'numeric' },
99
- { columnId: 'email', name: 'Email' },
100
- ],
101
- },
102
- {
103
- headerName: 'Employment',
104
- children: [
105
- { columnId: 'department', name: 'Department' },
106
- {
107
- columnId: 'salary', name: 'Salary', type: 'numeric',
108
- valueFormatter: (v: unknown) => `$${Number(v).toLocaleString()}`,
109
- },
110
- { columnId: 'status', name: 'Status' },
111
- ],
112
- },
113
- ],
114
- data: people,
115
- getRowId: (item: Person) => item.id,
116
- defaultPageSize: 10,
117
- };
118
- }
119
- ```
120
-
121
- :::tip Switching UI libraries
122
- Same component API across Angular packages. To switch, just change the import:
123
-
124
- - **Radix (CDK)**: `from '@alaarab/ogrid-angular-radix'` *(default, lightweight)*
125
- - **Angular Material**: `from '@alaarab/ogrid-angular-material'`
126
- - **PrimeNG**: `from '@alaarab/ogrid-angular-primeng'`
127
-
128
- All components are standalone - no NgModule required.
129
- :::
130
-
131
- </TabItem>
132
- <TabItem value="vue" label="Vue">
133
-
134
- ```vue
135
- <script setup lang="ts">
136
-
137
- const columns = [
138
- {
139
- headerName: 'Personal Info',
140
- children: [
141
- { columnId: 'name', name: 'Name' },
142
- { columnId: 'age', name: 'Age', type: 'numeric' },
143
- { columnId: 'email', name: 'Email' },
144
- ],
145
- },
146
- {
147
- headerName: 'Employment',
148
- children: [
149
- { columnId: 'department', name: 'Department' },
150
- {
151
- columnId: 'salary', name: 'Salary', type: 'numeric',
152
- valueFormatter: (v) => `$${Number(v).toLocaleString()}`,
153
- },
154
- { columnId: 'status', name: 'Status' },
155
- ],
156
- },
157
- ];
158
-
159
- const gridProps = {
160
- columns,
161
- data: people,
162
- getRowId: (item) => item.id,
163
- defaultPageSize: 10,
164
- };
165
- </script>
166
-
167
- <template>
168
- <OGrid :gridProps="gridProps" />
169
- </template>
170
- ```
171
-
172
- :::tip Switching UI libraries
173
- Same component API across Vue packages. To switch, just change the import:
174
-
175
- - **Radix (Headless UI)**: `from '@alaarab/ogrid-vue-radix'` *(default, lightweight)*
176
- - **Vuetify**: `from '@alaarab/ogrid-vue-vuetify'` - wrap in `<v-app>` for theming
177
- - **PrimeVue**: `from '@alaarab/ogrid-vue-primevue'`
178
- :::
179
-
180
- </TabItem>
181
- <TabItem value="js" label="Vanilla JS">
182
-
183
- ```js
184
-
185
- const grid = new OGrid(document.getElementById('grid'), {
186
- columns: [
187
- {
188
- headerName: 'Personal Info',
189
- children: [
190
- { columnId: 'name', name: 'Name' },
191
- { columnId: 'age', name: 'Age', type: 'numeric' },
192
- { columnId: 'email', name: 'Email' },
193
- ],
194
- },
195
- {
196
- headerName: 'Employment',
197
- children: [
198
- { columnId: 'department', name: 'Department' },
199
- {
200
- columnId: 'salary',
201
- name: 'Salary',
202
- type: 'numeric',
203
- valueFormatter: (v) => `$${Number(v).toLocaleString()}`,
204
- },
205
- { columnId: 'status', name: 'Status' },
206
- ],
207
- },
208
- ],
209
- data: people,
210
- getRowId: (p) => p.id,
211
- pageSize: 10,
212
- });
213
- ```
214
-
215
80
  </TabItem>
216
81
  </Tabs>
217
82
 
@@ -14,7 +14,7 @@ Pin columns to the left edge of the grid so they remain visible while the user s
14
14
  <ColumnPinningDemo />
15
15
 
16
16
  :::tip Try it in your framework
17
- The demo above uses Radix UI for styling. To see this feature with your framework's design system (Fluent UI, Material UI, Vuetify, PrimeNG, etc.), click **"Open in online demo"** below the demo.
17
+ The demo above uses Radix UI for styling. To see this feature with the Fluent UI implementation, click **"Open in online demo"** below the demo.
18
18
  :::
19
19
 
20
20
  ## Quick Example
@@ -68,115 +68,8 @@ The `OGrid` component has the same props across all React UI packages. To switch
68
68
 
69
69
  - **Radix** (lightweight, default): `from '@alaarab/ogrid-react-radix'`
70
70
  - **Fluent UI** (Microsoft 365 / SPFx): `from '@alaarab/ogrid-react-fluent'` - wrap in `<FluentProvider>`
71
- - **Material UI** (MUI v7): `from '@alaarab/ogrid-react-material'` - wrap in `<ThemeProvider>`
72
71
  :::
73
72
 
74
- </TabItem>
75
- <TabItem value="angular" label="Angular">
76
-
77
- ```typescript
78
-
79
- @Component({
80
- standalone: true,
81
- imports: [OGridComponent],
82
- template: `<ogrid [props]="gridProps" />`
83
- })
84
- export class GridComponent {
85
- gridProps = {
86
- columns: [
87
- { columnId: 'name', name: 'Name', pinned: 'left', defaultWidth: 160 },
88
- { columnId: 'email', name: 'Email', defaultWidth: 220 },
89
- { columnId: 'department', name: 'Department', defaultWidth: 160 },
90
- {
91
- columnId: 'salary', name: 'Salary', type: 'numeric', defaultWidth: 120,
92
- valueFormatter: (v: unknown) => `$${Number(v).toLocaleString()}`,
93
- },
94
- { columnId: 'status', name: 'Status', defaultWidth: 120 },
95
- { columnId: 'age', name: 'Age', type: 'numeric', defaultWidth: 80 },
96
- { columnId: 'startDate', name: 'Start Date', defaultWidth: 130 },
97
- ] as IColumnDef<Person>[],
98
- data: people,
99
- getRowId: (item: Person) => item.id,
100
- };
101
- }
102
- ```
103
-
104
- :::tip Switching UI libraries
105
- Same component API across Angular packages. To switch, just change the import:
106
-
107
- - **Radix (CDK)**: `from '@alaarab/ogrid-angular-radix'` *(default, lightweight)*
108
- - **Angular Material**: `from '@alaarab/ogrid-angular-material'`
109
- - **PrimeNG**: `from '@alaarab/ogrid-angular-primeng'`
110
-
111
- All components are standalone - no NgModule required.
112
- :::
113
-
114
- </TabItem>
115
- <TabItem value="vue" label="Vue">
116
-
117
- ```vue
118
- <script setup lang="ts">
119
-
120
- const columns: IColumnDef<Person>[] = [
121
- { columnId: 'name', name: 'Name', pinned: 'left', defaultWidth: 160 },
122
- { columnId: 'email', name: 'Email', defaultWidth: 220 },
123
- { columnId: 'department', name: 'Department', defaultWidth: 160 },
124
- {
125
- columnId: 'salary', name: 'Salary', type: 'numeric', defaultWidth: 120,
126
- valueFormatter: (v) => `$${Number(v).toLocaleString()}`,
127
- },
128
- { columnId: 'status', name: 'Status', defaultWidth: 120 },
129
- { columnId: 'age', name: 'Age', type: 'numeric', defaultWidth: 80 },
130
- { columnId: 'startDate', name: 'Start Date', defaultWidth: 130 },
131
- ];
132
-
133
- const gridProps = {
134
- columns,
135
- data: people,
136
- getRowId: (item) => item.id,
137
- };
138
- </script>
139
-
140
- <template>
141
- <OGrid :gridProps="gridProps" />
142
- </template>
143
- ```
144
-
145
- :::tip Switching UI libraries
146
- Same component API across Vue packages. To switch, just change the import:
147
-
148
- - **Radix (Headless UI)**: `from '@alaarab/ogrid-vue-radix'` *(default, lightweight)*
149
- - **Vuetify**: `from '@alaarab/ogrid-vue-vuetify'` - wrap in `<v-app>` for theming
150
- - **PrimeVue**: `from '@alaarab/ogrid-vue-primevue'`
151
- :::
152
-
153
- </TabItem>
154
- <TabItem value="js" label="Vanilla JS">
155
-
156
- ```js
157
-
158
- const grid = new OGrid(document.getElementById('grid'), {
159
- columns: [
160
- { columnId: 'name', name: 'Name', pinned: 'left', defaultWidth: 160 },
161
- { columnId: 'email', name: 'Email', defaultWidth: 220 },
162
- { columnId: 'department', name: 'Department', defaultWidth: 160 },
163
- {
164
- columnId: 'salary',
165
- name: 'Salary',
166
- type: 'numeric',
167
- defaultWidth: 120,
168
- valueFormatter: (v) => `$${Number(v).toLocaleString()}`,
169
- },
170
- { columnId: 'status', name: 'Status', defaultWidth: 120 },
171
- { columnId: 'age', name: 'Age', type: 'numeric', defaultWidth: 80 },
172
- { columnId: 'startDate', name: 'Start Date', defaultWidth: 130 },
173
- ],
174
- data: people,
175
- getRowId: (p) => p.id,
176
- pageSize: 10,
177
- });
178
- ```
179
-
180
73
  </TabItem>
181
74
  </Tabs>
182
75
 
@@ -14,7 +14,7 @@ Let users rearrange columns by dragging a column header and dropping it at a new
14
14
  <ColumnReorderingDemo />
15
15
 
16
16
  :::tip Try it in your framework
17
- The demo above uses Radix UI for styling. To see this feature with your framework's design system (Fluent UI, Material UI, Vuetify, PrimeNG, etc.), click **"Open in online demo"** below the demo.
17
+ The demo above uses Radix UI for styling. To see this feature with the Fluent UI implementation, click **"Open in online demo"** below the demo.
18
18
  :::
19
19
 
20
20
  ## Quick Example
@@ -60,111 +60,8 @@ The `OGrid` component has the same props across all React UI packages. To switch
60
60
 
61
61
  - **Radix** (lightweight, default): `from '@alaarab/ogrid-react-radix'`
62
62
  - **Fluent UI** (Microsoft 365 / SPFx): `from '@alaarab/ogrid-react-fluent'` - wrap in `<FluentProvider>`
63
- - **Material UI** (MUI v7): `from '@alaarab/ogrid-react-material'` - wrap in `<ThemeProvider>`
64
63
  :::
65
64
 
66
- </TabItem>
67
- <TabItem value="angular" label="Angular">
68
-
69
- ```typescript
70
-
71
- @Component({
72
- standalone: true,
73
- imports: [OGridComponent],
74
- template: `<ogrid [props]="gridProps" />`
75
- })
76
- export class GridComponent {
77
- gridProps = {
78
- columns: [
79
- { columnId: 'name', name: 'Name' },
80
- { columnId: 'email', name: 'Email' },
81
- { columnId: 'department', name: 'Department' },
82
- {
83
- columnId: 'salary', name: 'Salary', type: 'numeric',
84
- valueFormatter: (v: unknown) => `$${Number(v).toLocaleString()}`,
85
- },
86
- { columnId: 'status', name: 'Status' },
87
- ] as IColumnDef<Person>[],
88
- data: people,
89
- getRowId: (item: Person) => item.id,
90
- columnReorder: true,
91
- };
92
- }
93
- ```
94
-
95
- :::tip Switching UI libraries
96
- Same component API across Angular packages. To switch, just change the import:
97
-
98
- - **Radix (CDK)**: `from '@alaarab/ogrid-angular-radix'` *(default, lightweight)*
99
- - **Angular Material**: `from '@alaarab/ogrid-angular-material'`
100
- - **PrimeNG**: `from '@alaarab/ogrid-angular-primeng'`
101
-
102
- All components are standalone - no NgModule required.
103
- :::
104
-
105
- </TabItem>
106
- <TabItem value="vue" label="Vue">
107
-
108
- ```vue
109
- <script setup lang="ts">
110
-
111
- const columns: IColumnDef<Person>[] = [
112
- { columnId: 'name', name: 'Name' },
113
- { columnId: 'email', name: 'Email' },
114
- { columnId: 'department', name: 'Department' },
115
- {
116
- columnId: 'salary', name: 'Salary', type: 'numeric',
117
- valueFormatter: (v) => `$${Number(v).toLocaleString()}`,
118
- },
119
- { columnId: 'status', name: 'Status' },
120
- ];
121
-
122
- const gridProps = {
123
- columns,
124
- data: people,
125
- getRowId: (item) => item.id,
126
- columnReorder: true,
127
- };
128
- </script>
129
-
130
- <template>
131
- <OGrid :gridProps="gridProps" />
132
- </template>
133
- ```
134
-
135
- :::tip Switching UI libraries
136
- Same component API across Vue packages. To switch, just change the import:
137
-
138
- - **Radix (Headless UI)**: `from '@alaarab/ogrid-vue-radix'` *(default, lightweight)*
139
- - **Vuetify**: `from '@alaarab/ogrid-vue-vuetify'` - wrap in `<v-app>` for theming
140
- - **PrimeVue**: `from '@alaarab/ogrid-vue-primevue'`
141
- :::
142
-
143
- </TabItem>
144
- <TabItem value="js" label="Vanilla JS">
145
-
146
- ```js
147
-
148
- const grid = new OGrid(document.getElementById('grid'), {
149
- columns: [
150
- { columnId: 'name', name: 'Name' },
151
- { columnId: 'email', name: 'Email' },
152
- { columnId: 'department', name: 'Department' },
153
- {
154
- columnId: 'salary',
155
- name: 'Salary',
156
- type: 'numeric',
157
- valueFormatter: (v) => `$${Number(v).toLocaleString()}`,
158
- },
159
- { columnId: 'status', name: 'Status' },
160
- ],
161
- data: people,
162
- getRowId: (p) => p.id,
163
- columnReorder: true,
164
- pageSize: 10,
165
- });
166
- ```
167
-
168
65
  </TabItem>
169
66
  </Tabs>
170
67
 
@@ -207,70 +104,6 @@ function App() {
207
104
  />
208
105
  );
209
106
  }
210
- ```
211
-
212
- </TabItem>
213
- <TabItem value="angular" label="Angular">
214
-
215
- ```typescript
216
-
217
- @Component({
218
- standalone: true,
219
- imports: [OGridComponent],
220
- template: `<ogrid [props]="gridProps()" />`
221
- })
222
- export class GridComponent {
223
- columnOrder = signal(['name', 'email', 'department', 'salary', 'status']);
224
-
225
- gridProps = () => ({
226
- columns,
227
- data: people,
228
- getRowId: (item: Person) => item.id,
229
- columnReorder: true,
230
- columnOrder: this.columnOrder(),
231
- onColumnOrderChange: (order: string[]) => this.columnOrder.set(order),
232
- });
233
- }
234
- ```
235
-
236
- </TabItem>
237
- <TabItem value="vue" label="Vue">
238
-
239
- ```vue
240
- <script setup lang="ts">
241
-
242
- const columnOrder = ref(['name', 'email', 'department', 'salary', 'status']);
243
-
244
- const gridProps = computed(() => ({
245
- columns,
246
- data: people,
247
- getRowId: (item) => item.id,
248
- columnReorder: true,
249
- columnOrder: columnOrder.value,
250
- onColumnOrderChange: (order: string[]) => { columnOrder.value = order; },
251
- }));
252
- </script>
253
-
254
- <template>
255
- <OGrid :gridProps="gridProps" />
256
- </template>
257
- ```
258
-
259
- </TabItem>
260
- <TabItem value="js" label="Vanilla JS">
261
-
262
- ```js
263
-
264
- const grid = new OGrid(document.getElementById('grid'), {
265
- columns,
266
- data: people,
267
- getRowId: (p) => p.id,
268
- columnReorder: true,
269
- columnOrder: ['name', 'email', 'department', 'salary', 'status'],
270
- onColumnOrderChange: (order) => {
271
- console.log('New column order:', order);
272
- },
273
- });
274
107
  ```
275
108
 
276
109
  </TabItem>
@@ -63,79 +63,8 @@ The `OGrid` component has the same props across all React UI packages. To switch
63
63
 
64
64
  - **Radix** (lightweight, default): `from '@alaarab/ogrid-react-radix'`
65
65
  - **Fluent UI** (Microsoft 365 / SPFx): `from '@alaarab/ogrid-react-fluent'` - wrap in `<FluentProvider>`
66
- - **Material UI** (MUI v7): `from '@alaarab/ogrid-react-material'` - wrap in `<ThemeProvider>`
67
66
  :::
68
67
 
69
- </TabItem>
70
- <TabItem value="angular" label="Angular">
71
-
72
- ```typescript
73
-
74
- @Component({
75
- standalone: true,
76
- imports: [OGridComponent],
77
- template: `<ogrid [props]="gridProps" />`
78
- })
79
- export class GridComponent {
80
- gridProps = {
81
- columns: columns,
82
- data: data,
83
- getRowId: (r: Row) => r.id,
84
- editable: true,
85
- };
86
- }
87
- ```
88
-
89
- :::tip Switching UI libraries
90
- Same component API across Angular packages. To switch, just change the import:
91
-
92
- - **Radix (CDK)**: `from '@alaarab/ogrid-angular-radix'` *(default, lightweight)*
93
- - **Angular Material**: `from '@alaarab/ogrid-angular-material'`
94
- - **PrimeNG**: `from '@alaarab/ogrid-angular-primeng'`
95
-
96
- All components are standalone - no NgModule required.
97
- :::
98
-
99
- </TabItem>
100
- <TabItem value="vue" label="Vue">
101
-
102
- ```vue
103
- <script setup lang="ts">
104
-
105
- const gridProps = {
106
- columns,
107
- data,
108
- getRowId: (r) => r.id,
109
- editable: true,
110
- };
111
- </script>
112
-
113
- <template>
114
- <OGrid :gridProps="gridProps" />
115
- </template>
116
- ```
117
-
118
- :::tip Switching UI libraries
119
- Same component API across Vue packages. To switch, just change the import:
120
-
121
- - **Radix (Headless UI)**: `from '@alaarab/ogrid-vue-radix'` *(default, lightweight)*
122
- - **Vuetify**: `from '@alaarab/ogrid-vue-vuetify'` - wrap in `<v-app>` for theming
123
- - **PrimeVue**: `from '@alaarab/ogrid-vue-primevue'`
124
- :::
125
-
126
- </TabItem>
127
- <TabItem value="js" label="Vanilla JS">
128
-
129
- ```js
130
-
131
- const grid = new OGrid(document.getElementById('grid'), {
132
- columns: columns,
133
- data: data,
134
- getRowId: (r) => r.id,
135
- editable: true,
136
- });
137
- ```
138
-
139
68
  </TabItem>
140
69
  </Tabs>
141
70
 
@@ -14,7 +14,7 @@ Right-click any cell to open a context menu with clipboard operations, undo/redo
14
14
  <ContextMenuDemo />
15
15
 
16
16
  :::tip Try it in your framework
17
- The demo above uses Radix UI for styling. To see this feature with your framework's design system (Fluent UI, Material UI, Vuetify, PrimeNG, etc.), click **"Open in online demo"** below the demo.
17
+ The demo above uses Radix UI for styling. To see this feature with the Fluent UI implementation, click **"Open in online demo"** below the demo.
18
18
  :::
19
19
 
20
20
  ## Quick Example
@@ -51,100 +51,8 @@ The `OGrid` component has the same props across all React UI packages. To switch
51
51
 
52
52
  - **Radix** (lightweight, default): `from '@alaarab/ogrid-react-radix'`
53
53
  - **Fluent UI** (Microsoft 365 / SPFx): `from '@alaarab/ogrid-react-fluent'` - wrap in `<FluentProvider>`
54
- - **Material UI** (MUI v7): `from '@alaarab/ogrid-react-material'` - wrap in `<ThemeProvider>`
55
54
  :::
56
55
 
57
- </TabItem>
58
- <TabItem value="angular" label="Angular">
59
-
60
- ```typescript
61
-
62
- @Component({
63
- standalone: true,
64
- imports: [OGridComponent],
65
- template: `<ogrid [props]="gridProps" />`
66
- })
67
- export class GridComponent {
68
- gridProps = {
69
- columns: [
70
- { columnId: 'name', name: 'Name', editable: true },
71
- { columnId: 'department', name: 'Department' },
72
- {
73
- columnId: 'salary', name: 'Salary', type: 'numeric', editable: true,
74
- valueFormatter: (v: unknown) => `$${Number(v).toLocaleString()}`,
75
- },
76
- ] as IColumnDef<Person>[],
77
- data: people,
78
- getRowId: (item: Person) => item.id,
79
- editable: true,
80
- contextMenu: true,
81
- };
82
- }
83
- ```
84
-
85
- :::tip Switching UI libraries
86
- Same component API across Angular packages. To switch, just change the import:
87
-
88
- - **Radix (CDK)**: `from '@alaarab/ogrid-angular-radix'` *(default, lightweight)*
89
- - **Angular Material**: `from '@alaarab/ogrid-angular-material'`
90
- - **PrimeNG**: `from '@alaarab/ogrid-angular-primeng'`
91
-
92
- All components are standalone - no NgModule required.
93
- :::
94
-
95
- </TabItem>
96
- <TabItem value="vue" label="Vue">
97
-
98
- ```vue
99
- <script setup lang="ts">
100
-
101
- const columns: IColumnDef<Person>[] = [
102
- { columnId: 'name', name: 'Name', editable: true },
103
- { columnId: 'department', name: 'Department' },
104
- {
105
- columnId: 'salary', name: 'Salary', type: 'numeric', editable: true,
106
- valueFormatter: (v) => `$${Number(v).toLocaleString()}`,
107
- },
108
- ];
109
-
110
- const gridProps = {
111
- columns,
112
- data: people,
113
- getRowId: (item) => item.id,
114
- editable: true,
115
- contextMenu: true,
116
- };
117
- </script>
118
-
119
- <template>
120
- <OGrid :gridProps="gridProps" />
121
- </template>
122
- ```
123
-
124
- :::tip Switching UI libraries
125
- Same component API across Vue packages. To switch, just change the import:
126
-
127
- - **Radix (Headless UI)**: `from '@alaarab/ogrid-vue-radix'` *(default, lightweight)*
128
- - **Vuetify**: `from '@alaarab/ogrid-vue-vuetify'` - wrap in `<v-app>` for theming
129
- - **PrimeVue**: `from '@alaarab/ogrid-vue-primevue'`
130
- :::
131
-
132
- </TabItem>
133
- <TabItem value="js" label="Vanilla JS">
134
-
135
- ```js
136
-
137
- const grid = new OGrid(document.getElementById('grid'), {
138
- columns: columns,
139
- data: data,
140
- getRowId: (r) => r.id,
141
- editable: true,
142
- });
143
-
144
- // Right-click any cell to see the context menu
145
- // Undo/redo is handled automatically by the JS package
146
- ```
147
-
148
56
  </TabItem>
149
57
  </Tabs>
150
58