igniteui-cli 15.5.1 → 15.6.1
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/package.json +4 -4
- package/templates/blazor/igb/projects/ai-config/files/skills/AGENTS.md +6 -3
- package/templates/blazor/igb/projects/ai-config/files/skills/README.md +30 -45
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/SKILL.md +48 -96
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/charts.md +61 -238
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/data-display.md +60 -193
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/feedback.md +36 -92
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/form-controls.md +66 -224
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout-manager.md +39 -88
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout.md +75 -152
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/setup.md +40 -149
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/SKILL.md +58 -243
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/component-mapping.md +89 -280
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/gotchas.md +143 -431
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/SKILL.md +91 -157
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/data-operations.md +50 -228
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/editing.md +61 -222
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/features.md +67 -360
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/grid-migration.md +55 -236
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/paging-remote.md +53 -202
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/sizing.md +31 -232
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/state.md +27 -119
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/structure.md +88 -363
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/types.md +87 -415
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-lite-testing/SKILL.md +8 -4
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-lite-testing/references/interop-contracts.md +42 -6
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/SKILL.md +83 -211
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/common-patterns.md +93 -184
- package/templates/react/igr-ts/avatar/default/files/src/app/__path__/__filePrefix__.tsx +3 -3
- package/templates/react/igr-ts/avatar/default/files/src/app/__path__/style.module.css +9 -0
- package/templates/react/igr-ts/button/default/files/src/app/__path__/__filePrefix__.tsx +1 -1
- package/templates/react/igr-ts/button/default/files/src/app/__path__/style.module.css +3 -0
- package/templates/react/igr-ts/icon/default/files/src/app/__path__/__filePrefix__.tsx +2 -2
- package/templates/react/igr-ts/icon/default/files/src/app/__path__/style.module.css +3 -0
- package/templates/react/igr-ts/icon-button/default/files/src/app/__path__/__filePrefix__.tsx +1 -1
- package/templates/react/igr-ts/icon-button/default/files/src/app/__path__/style.module.css +3 -0
- package/templates/react/igr-ts/pivot-grid/basic/files/src/app/__path__/__filePrefix__.tsx +3 -4
- package/templates/react/igr-ts/projects/_base/files/package.json +1 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/README.md +30 -83
- package/templates/react/igr-ts/projects/ai-config/files/skills/grid-lite-to-igr-grid-migration/SKILL.md +98 -191
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/SKILL.md +38 -147
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/COMPONENTS.md +65 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/DATAVIZ.md +90 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/MCP.md +43 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/TROUBLESHOOTING.md +17 -145
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/USAGE.md +85 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/SKILL.md +83 -135
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/CSS-THEMING.md +51 -218
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/SKILL.md +58 -187
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/reference/gotchas.md +55 -154
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-optimize-bundle-size/SKILL.md +48 -401
- package/templates/webcomponents/igc-ts/avatar/default/files/src/app/__path__/__filePrefix__.ts +7 -2
- package/templates/webcomponents/igc-ts/button/default/files/src/app/__path__/__filePrefix__.ts +8 -3
- package/templates/webcomponents/igc-ts/card/default/files/src/app/__path__/__filePrefix__.ts +3 -1
- package/templates/webcomponents/igc-ts/constants.d.ts +5 -5
- package/templates/webcomponents/igc-ts/constants.js +5 -5
- package/templates/webcomponents/igc-ts/date-time-input/default/files/src/app/__path__/__filePrefix__.ts +8 -2
- package/templates/webcomponents/igc-ts/icon/default/files/src/app/__path__/__filePrefix__.ts +7 -3
- package/templates/webcomponents/igc-ts/icon-button/default/files/src/app/__path__/__filePrefix__.ts +8 -2
- package/templates/webcomponents/igc-ts/projects/_base/files/package.json +1 -1
- package/templates/webcomponents/igc-ts/projects/_base_with_home/files/package.json +6 -6
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/README.md +1 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/login-bar/login-bar.ts +1 -1
- package/templates/webcomponents/igc-ts/tabs/default/files/src/app/__path__/__filePrefix__.ts +21 -15
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/mcp-setup.md +0 -78
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/mcp-setup.md +0 -78
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/mcp-setup.md +0 -81
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/CHARTS-GRIDS.md +0 -398
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/COMPONENT-CATALOGUE.md +0 -161
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/EVENT-HANDLING.md +0 -72
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/INSTALLATION.md +0 -139
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/JSX-PATTERNS.md +0 -187
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/MCP-SERVER.md +0 -77
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/REFS-FORMS.md +0 -232
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/MCP-SERVER.md +0 -67
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/TROUBLESHOOTING.md +0 -35
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/reference/component-mapping.md +0 -132
- /package/templates/webcomponents/igc-ts/tabs/default/files/src/app/__path__/{__filePrefix__.test → __filePrefix__.test.ts} +0 -0
|
@@ -1,240 +1,138 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: grid-lite-to-igr-grid-migration
|
|
3
|
-
description:
|
|
3
|
+
description: Migrate from Grid Lite (IgrGridLite) to the premium Ignite UI for React Data Grid (IgrGrid) — imports, theme CSS, column and template API changes, sorting and filtering, remote data replacing dataPipelineConfiguration, and the toolbar/export APIs. Use when Grid Lite lacks a needed feature such as editing, selection, paging, grouping, summaries, pinning, or export.
|
|
4
4
|
user-invocable: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# Grid Lite → Premium Data Grid
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Read the user's current Grid Lite usage first — columns, templates, data binding, `dataPipelineConfiguration` — then confirm APIs with `get_doc({ framework: 'react', name: 'grid-editing' })` or `get_api_reference({ platform: 'react', component: 'IgrGrid' })` rather than from memory. Grid APIs change between versions.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## Is the migration warranted?
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Grid Lite has none of these; each is a valid reason to move:
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
| Feature | `IgrGrid` |
|
|
16
|
+
|---|---|
|
|
17
|
+
| Cell / row editing | `editable` on the column, `rowEditable` on the grid |
|
|
18
|
+
| Batch editing with undo | transaction service |
|
|
19
|
+
| Row add / delete | `rowEditable` + `IgrActionStrip` |
|
|
20
|
+
| Row / cell / column selection | `rowSelection`, `cellSelection`, `columnSelection` |
|
|
21
|
+
| Paging | `IgrPaginator` child |
|
|
22
|
+
| Grouping | `groupingExpressions` |
|
|
23
|
+
| Summaries | `hasSummary` on the column |
|
|
24
|
+
| Column pinning / moving / hiding | `pinned`, `moving`, toolbar actions |
|
|
25
|
+
| Master-detail, hierarchical rows | row expansion, `IgrTreeGrid`, `IgrHierarchicalGrid` |
|
|
26
|
+
| Excel / CSV export | `IgrGridToolbarExporter` |
|
|
27
|
+
| Advanced filtering UI | `filterMode="excelStyleFilter"`, `IgrGridToolbarAdvancedFiltering` |
|
|
28
|
+
| State persistence | `IgrGridState` |
|
|
29
|
+
| Row drag and drop | `rowDraggable` |
|
|
18
30
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
## When to Migrate from Grid Lite to Premium Grid
|
|
22
|
-
|
|
23
|
-
Migrate when you need any of the following features (not available in Grid Lite):
|
|
24
|
-
|
|
25
|
-
| Feature | Grid Lite | Premium Grid (`IgrGrid`) |
|
|
26
|
-
|---|---|---|
|
|
27
|
-
| Cell editing | ✗ | ✓ `editable`, `rowEditable` |
|
|
28
|
-
| Batch editing (with undo) | ✗ | ✓ Transaction service |
|
|
29
|
-
| Row adding / deleting | ✗ | ✓ `rowEditable` + `IgrActionStrip` |
|
|
30
|
-
| Row selection | ✗ | ✓ `rowSelection="single|multiple"` |
|
|
31
|
-
| Cell selection | ✗ | ✓ `cellSelection` |
|
|
32
|
-
| Column selection | ✗ | ✓ `columnSelection` |
|
|
33
|
-
| Paging | ✗ | ✓ `IgrPaginator` child |
|
|
34
|
-
| GroupBy | ✗ | ✓ `groupingExpressions` |
|
|
35
|
-
| Column summaries | ✗ | ✓ `hasSummary` on `IgrColumn` |
|
|
36
|
-
| Column pinning | ✗ | ✓ `pinned` on `IgrColumn` |
|
|
37
|
-
| Column moving | ✗ | ✓ `moving={true}` on grid |
|
|
38
|
-
| Master-detail rows | ✗ | ✓ `IgrGrid` row expansion |
|
|
39
|
-
| Excel / CSV export (toolbar) | ✗ | ✓ `IgrGridToolbarExporter` |
|
|
40
|
-
| Column hiding toolbar | ✗ | ✓ `IgrGridToolbarHiding` |
|
|
41
|
-
| Column pinning toolbar | ✗ | ✓ `IgrGridToolbarPinning` |
|
|
42
|
-
| Advanced filtering UI | ✗ | ✓ `filterMode="excelStyleFilter"` / `IgrGridToolbarAdvancedFiltering` |
|
|
43
|
-
| State persistence | ✗ | ✓ `IgrGridState` directive |
|
|
44
|
-
| Clipboard operations | ✗ | ✓ `clipboardOptions` |
|
|
45
|
-
| Action strip | ✗ | ✓ `IgrActionStrip` |
|
|
46
|
-
| Row drag and drop | ✗ | ✓ `rowDraggable={true}` |
|
|
47
|
-
|
|
48
|
-
---
|
|
31
|
+
If none applies, staying on Grid Lite is lighter — see [igniteui-react-optimize-bundle-size](../igniteui-react-optimize-bundle-size/SKILL.md).
|
|
49
32
|
|
|
50
33
|
## Setup
|
|
51
34
|
|
|
52
35
|
```bash
|
|
53
|
-
npm install --save igniteui-react-grids
|
|
54
|
-
# licensed: npm install --save @infragistics/igniteui-react-grids
|
|
36
|
+
npm install --save igniteui-react-grids # or @infragistics/igniteui-react-grids when licensed
|
|
55
37
|
```
|
|
56
38
|
|
|
57
39
|
```tsx
|
|
58
|
-
import {
|
|
59
|
-
|
|
60
|
-
import "igniteui-react-grids/grids/themes/light/bootstrap.css";
|
|
61
|
-
|
|
62
|
-
// Required once before render — Grid Lite has no equivalent
|
|
63
|
-
IgrGridModule.register();
|
|
40
|
+
import { IgrGrid, IgrColumn } from 'igniteui-react-grids';
|
|
41
|
+
import 'igniteui-react-grids/grids/themes/light/bootstrap.css'; // in addition to the base theme
|
|
64
42
|
```
|
|
65
43
|
|
|
66
|
-
|
|
67
|
-
> Check `package.json` — `igniteui-grid-lite` may be a standalone dependency alongside `igniteui-react`.
|
|
68
|
-
|
|
69
|
-
---
|
|
44
|
+
**No registration.** `IgrGridModule.register()` is deprecated and unnecessary — the React wrapper registers the element on import. Do not add it, and delete it if present.
|
|
70
45
|
|
|
71
|
-
## Minimal
|
|
46
|
+
## Minimal port
|
|
72
47
|
|
|
73
48
|
```tsx
|
|
74
|
-
import { useRef, useState } from
|
|
75
|
-
import { IgrGrid, IgrColumn
|
|
76
|
-
import
|
|
77
|
-
IgrGridModule.register();
|
|
49
|
+
import { useRef, useState } from 'react';
|
|
50
|
+
import { IgrGrid, IgrColumn } from 'igniteui-react-grids';
|
|
51
|
+
import 'igniteui-react-grids/grids/themes/light/bootstrap.css';
|
|
78
52
|
|
|
79
|
-
export default function
|
|
80
|
-
const
|
|
81
|
-
const [data] = useState<Product[]>([]);
|
|
53
|
+
export default function Products({ data }: { data: Product[] }) {
|
|
54
|
+
const grid = useRef<IgrGrid>(null);
|
|
82
55
|
|
|
83
56
|
return (
|
|
84
|
-
<IgrGrid ref={
|
|
57
|
+
<IgrGrid ref={grid} data={data} primaryKey="id" autoGenerate={false}
|
|
85
58
|
height="600px" allowFiltering={true}>
|
|
86
|
-
<IgrColumn field="name" header="Name" sortable
|
|
87
|
-
<IgrColumn field="price" header="Price" dataType="number" sortable
|
|
59
|
+
<IgrColumn field="name" header="Name" sortable filterable resizable />
|
|
60
|
+
<IgrColumn field="price" header="Price" dataType="number" sortable />
|
|
88
61
|
</IgrGrid>
|
|
89
62
|
);
|
|
90
63
|
}
|
|
91
64
|
```
|
|
92
65
|
|
|
93
|
-
|
|
94
|
-
- `primaryKey` — required for editing, selection, row-targeted APIs
|
|
95
|
-
- `height` — required for row virtualization
|
|
96
|
-
- `allowFiltering={true}` on the grid — required for filter UI; `filterable={true}` on the column opts that column in
|
|
66
|
+
Three additions Grid Lite did not need:
|
|
97
67
|
|
|
98
|
-
|
|
68
|
+
- `primaryKey` — required for editing, selection, and any row-targeted API.
|
|
69
|
+
- `height` — required for row virtualization; without it the grid renders no rows.
|
|
70
|
+
- `allowFiltering` on the grid **and** `filterable` on each column — the grid-level flag alone shows no UI.
|
|
99
71
|
|
|
100
|
-
|
|
72
|
+
As in Grid Lite, **do not set column `width`** unless the user asked; `IgrColumn` sizes itself and fixed widths leave dead space.
|
|
101
73
|
|
|
102
|
-
|
|
74
|
+
## API renames
|
|
103
75
|
|
|
104
|
-
|
|
105
|
-
import { IgrCellTemplateContext } from "igniteui-react-grids";
|
|
106
|
-
|
|
107
|
-
const statusCell = (ctx: IgrCellTemplateContext) => (
|
|
108
|
-
<span style={{ color: ctx.cell.value === "Active" ? "green" : "red" }}>
|
|
109
|
-
{ctx.cell.value}
|
|
110
|
-
</span>
|
|
111
|
-
);
|
|
112
|
-
|
|
113
|
-
<IgrColumn field="status" bodyTemplate={statusCell} />
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
| | Grid Lite | Premium Grid |
|
|
76
|
+
| | Grid Lite | `IgrGrid` |
|
|
117
77
|
|---|---|---|
|
|
118
|
-
|
|
|
119
|
-
|
|
|
78
|
+
| Cell template prop | `cellTemplate` | `bodyTemplate` |
|
|
79
|
+
| Cell context type | `IgrCellContext<T>` | `IgrCellTemplateContext` |
|
|
80
|
+
| Cell value | `ctx.value` | `ctx.cell.value` (or `ctx.implicit`) |
|
|
120
81
|
| Row data | `ctx.row.data` | `ctx.cell.row.data` |
|
|
121
|
-
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
Prop name unchanged (`headerTemplate`); context type changes to `IgrColumnTemplateContext` from `igniteui-react-grids`.
|
|
82
|
+
| Header context type | `IgrHeaderContext<T>` | `IgrColumnTemplateContext` |
|
|
83
|
+
| Header prop | `headerTemplate` | `headerTemplate` (unchanged) |
|
|
84
|
+
| Editor template | — | `inlineEditorTemplate` |
|
|
85
|
+
| Sorting expression | `{ key, direction: 'ascending' }` | `{ fieldName, dir: SortingDirection.Asc }` |
|
|
86
|
+
| Remote data | `dataPipelineConfiguration` | noop strategies + done events |
|
|
128
87
|
|
|
129
88
|
```tsx
|
|
130
|
-
import {
|
|
89
|
+
import { type IgrCellTemplateContext, IgrColumn } from 'igniteui-react-grids';
|
|
131
90
|
|
|
132
|
-
const
|
|
133
|
-
<
|
|
91
|
+
const status = (ctx: IgrCellTemplateContext) => (
|
|
92
|
+
<span style={{ color: ctx.cell.value === 'Active' ? 'green' : 'red' }}>{ctx.cell.value}</span>
|
|
134
93
|
);
|
|
135
94
|
|
|
136
|
-
<IgrColumn field="
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
---
|
|
140
|
-
|
|
141
|
-
## Remote Data (replaces `dataPipelineConfiguration`)
|
|
142
|
-
|
|
143
|
-
For server-side operations, disable local sort/filter processing first by assigning noop strategies, then listen to the done events to issue new requests.
|
|
144
|
-
|
|
145
|
-
```tsx
|
|
146
|
-
import { IgrGrid, IgrGridModule,
|
|
147
|
-
IgrNoopSortingStrategy, IgrNoopFilteringStrategy } from "igniteui-react-grids";
|
|
148
|
-
|
|
149
|
-
// Disable built-in sort/filter so the grid does not process data locally.
|
|
150
|
-
// Set these once after the grid mounts (e.g., in a useEffect or ref callback).
|
|
151
|
-
useEffect(() => {
|
|
152
|
-
if (!gridRef.current) return;
|
|
153
|
-
gridRef.current.sortStrategy = IgrNoopSortingStrategy.instance();
|
|
154
|
-
gridRef.current.filterStrategy = IgrNoopFilteringStrategy.instance();
|
|
155
|
-
}, []);
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
```tsx
|
|
159
|
-
const handleSortingDone = async () => {
|
|
160
|
-
if (!gridRef.current) return;
|
|
161
|
-
setData(await dataService.sort(gridRef.current.sortingExpressions));
|
|
162
|
-
};
|
|
163
|
-
const handleFilteringDone = async () => {
|
|
164
|
-
if (!gridRef.current) return;
|
|
165
|
-
setData(await dataService.filter(gridRef.current.filteringExpressionsTree));
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
<IgrGrid ref={gridRef} data={data} primaryKey="id" height="600px"
|
|
169
|
-
onSortingDone={handleSortingDone} onFilteringDone={handleFilteringDone}>
|
|
170
|
-
{/* columns */}
|
|
171
|
-
</IgrGrid>
|
|
95
|
+
<IgrColumn field="status" bodyTemplate={status} />
|
|
172
96
|
```
|
|
173
97
|
|
|
174
|
-
|
|
98
|
+
Note the context types are no longer generic over the row type.
|
|
175
99
|
|
|
176
|
-
## Programmatic
|
|
100
|
+
## Programmatic sort and filter
|
|
177
101
|
|
|
178
102
|
```tsx
|
|
179
|
-
import { SortingDirection, IgrNumberFilteringOperand } from
|
|
103
|
+
import { SortingDirection, IgrNumberFilteringOperand } from 'igniteui-react-grids';
|
|
180
104
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
gridRef.current.clearSort('name'); // or clearSort() for all
|
|
105
|
+
grid.current.sort([{ fieldName: 'name', dir: SortingDirection.Asc, ignoreCase: true }]);
|
|
106
|
+
grid.current.clearSort('name'); // or clearSort() for all
|
|
184
107
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
gridRef.current.filter('age', 21, IgrNumberFilteringOperand.instance().condition('greaterThan'));
|
|
188
|
-
gridRef.current.clearFilter('age'); // or clearFilter() for all
|
|
108
|
+
grid.current.filter('age', 21, IgrNumberFilteringOperand.instance().condition('greaterThan'));
|
|
109
|
+
grid.current.clearFilter('age');
|
|
189
110
|
```
|
|
190
111
|
|
|
191
|
-
|
|
112
|
+
Operands are available per data type: `IgrStringFilteringOperand`, `IgrNumberFilteringOperand`, `IgrBooleanFilteringOperand`, `IgrDateFilteringOperand`, `IgrDateTimeFilteringOperand`, `IgrTimeFilteringOperand`.
|
|
192
113
|
|
|
193
|
-
##
|
|
194
|
-
|
|
195
|
-
### Editing
|
|
196
|
-
|
|
197
|
-
```tsx
|
|
198
|
-
<IgrGrid data={data} primaryKey="id" rowEditable={true} onRowEditDone={handleRowEditDone} height="600px">
|
|
199
|
-
<IgrColumn field="name" editable={true} />
|
|
200
|
-
</IgrGrid>
|
|
201
|
-
```
|
|
114
|
+
## Remote data (replacing `dataPipelineConfiguration`)
|
|
202
115
|
|
|
203
|
-
|
|
116
|
+
Assign noop strategies so the grid stops processing locally, then re-fetch on the done events.
|
|
204
117
|
|
|
205
118
|
```tsx
|
|
206
|
-
|
|
207
|
-
{/* columns */}
|
|
208
|
-
</IgrGrid>
|
|
209
|
-
// Read: gridRef.current.selectedRows
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
### Paging
|
|
119
|
+
import { IgrNoopSortingStrategy, IgrNoopFilteringStrategy } from 'igniteui-react-grids';
|
|
213
120
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
### Summaries
|
|
121
|
+
useEffect(() => {
|
|
122
|
+
if (!grid.current) return;
|
|
123
|
+
grid.current.sortStrategy = IgrNoopSortingStrategy.instance();
|
|
124
|
+
grid.current.filterStrategy = IgrNoopFilteringStrategy.instance();
|
|
125
|
+
}, []);
|
|
221
126
|
|
|
222
|
-
|
|
223
|
-
|
|
127
|
+
<IgrGrid ref={grid} data={data} primaryKey="id" height="600px"
|
|
128
|
+
onSortingDone={async () => setData(await api.sort(grid.current!.sortingExpressions))}
|
|
129
|
+
onFilteringDone={async () => setData(await api.filter(grid.current!.filteringExpressionsTree))}>
|
|
224
130
|
```
|
|
225
131
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
> **Note:** `IgrExcelExporterService` / `IgrExcelExporterOptions` (programmatic export) must be imported from `"igniteui-react"`, **not** `"igniteui-react-grids"`. The toolbar approach below does not need them.
|
|
132
|
+
## Toolbar and export
|
|
229
133
|
|
|
230
134
|
```tsx
|
|
231
|
-
|
|
232
|
-
IgrGridToolbarActions, IgrGridToolbarHiding, IgrGridToolbarPinning,
|
|
233
|
-
IgrGridToolbarExporter, IgrGridToolbarAdvancedFiltering,
|
|
234
|
-
IgrGridToolbarExportEventArgs, IgrGridModule } from "igniteui-react-grids";
|
|
235
|
-
IgrGridModule.register();
|
|
236
|
-
|
|
237
|
-
<IgrGrid data={data} primaryKey="id" height="600px" onToolbarExporting={handleExporting}>
|
|
135
|
+
<IgrGrid data={data} primaryKey="id" height="600px" onToolbarExporting={onExporting}>
|
|
238
136
|
<IgrGridToolbar>
|
|
239
137
|
<IgrGridToolbarTitle>Products</IgrGridToolbarTitle>
|
|
240
138
|
<IgrGridToolbarActions>
|
|
@@ -244,31 +142,40 @@ IgrGridModule.register();
|
|
|
244
142
|
<IgrGridToolbarExporter exportExcel={true} exportCSV={true} />
|
|
245
143
|
</IgrGridToolbarActions>
|
|
246
144
|
</IgrGridToolbar>
|
|
247
|
-
{/* columns */}
|
|
248
145
|
</IgrGrid>
|
|
249
146
|
```
|
|
250
147
|
|
|
251
148
|
```tsx
|
|
252
|
-
const
|
|
253
|
-
e.detail.options.fileName =
|
|
254
|
-
//
|
|
149
|
+
const onExporting = (e: IgrGridToolbarExportEventArgs) => {
|
|
150
|
+
e.detail.options.fileName = 'products';
|
|
151
|
+
// e.detail.cancel = true to abort
|
|
255
152
|
};
|
|
256
153
|
```
|
|
257
154
|
|
|
258
|
-
|
|
155
|
+
For programmatic export, `IgrExcelExporterService` / `IgrExcelExporterOptions` and the CSV equivalents come from **`igniteui-react-grids`** — the same package as the grid.
|
|
259
156
|
|
|
260
|
-
##
|
|
157
|
+
## Other feature snippets
|
|
261
158
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
159
|
+
```tsx
|
|
160
|
+
<IgrGrid data={data} primaryKey="id" height="600px" rowEditable={true} onRowEditDone={onDone}>
|
|
161
|
+
<IgrColumn field="name" editable={true} />
|
|
162
|
+
<IgrColumn field="price" dataType="number" hasSummary={true} />
|
|
163
|
+
</IgrGrid>
|
|
265
164
|
|
|
266
|
-
|
|
165
|
+
<IgrGrid data={data} primaryKey="id" height="600px" rowSelection="multiple"> {/* grid.current.selectedRows */}
|
|
166
|
+
<IgrPaginator perPage={15} />
|
|
167
|
+
</IgrGrid>
|
|
168
|
+
```
|
|
267
169
|
|
|
268
|
-
##
|
|
170
|
+
## Cleanup
|
|
171
|
+
|
|
172
|
+
1. Remove `dataPipelineConfiguration` and any hooks it used.
|
|
173
|
+
2. Remove `IgrCellContext` / `IgrHeaderContext` imports from `igniteui-react/grid-lite`.
|
|
174
|
+
3. Remove any `IgrGridModule.register()` calls.
|
|
175
|
+
4. `npm uninstall igniteui-grid-lite` once no `IgrGridLite` instances remain.
|
|
176
|
+
5. Keep the base theme CSS; add the grid theme CSS.
|
|
269
177
|
|
|
270
|
-
|
|
271
|
-
- [igniteui-react-customize-theme](../igniteui-react-customize-theme/SKILL.md) — Customize `IgrGrid` styling using CSS custom properties and the Ignite UI theming system.
|
|
272
|
-
- [igniteui-react-optimize-bundle-size](../igniteui-react-optimize-bundle-size/SKILL.md) — Reduce bundle size after migrating to `igniteui-react-grids` with granular imports, tree-shaking, and lazy loading.
|
|
273
|
-
- [igniteui-react-generate-from-image-design](../igniteui-react-generate-from-image-design/SKILL.md) — Build a full React view from a screenshot or mockup using Ignite UI components and MCP-driven theming.
|
|
178
|
+
## Related skills
|
|
274
179
|
|
|
180
|
+
- [igniteui-react-components](../igniteui-react-components/SKILL.md) — the wider grid feature set, events, refs
|
|
181
|
+
- [igniteui-react-customize-theme](../igniteui-react-customize-theme/SKILL.md) — grid tokens such as `--ig-grid-header-background`
|
package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/SKILL.md
CHANGED
|
@@ -1,181 +1,72 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: igniteui-react-components
|
|
3
|
-
description:
|
|
3
|
+
description: Pick, install, and use Ignite UI for React (Igr*) components — package routing, theme CSS, JSX and slots, events, refs, forms, TypeScript, charts/gauges/maps, grids. Use when choosing a component for a UI pattern, setting up igniteui-react, writing Igr* JSX, wiring events or refs, or debugging components that render unstyled, invisible, or with broken icons.
|
|
4
4
|
user-invocable: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Ignite UI for React Components
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
`Igr*` components are React wrappers around `igc-*` web components. Everything below follows from that.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## Non-negotiables
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
> After writing the file, inform the user that the MCP server has been
|
|
20
|
-
> configured and they may need to reload the editor for the tools to activate.
|
|
21
|
-
> Start the MCP server and wait for that MCP server to start before continuing the component-related work.
|
|
22
|
-
> Do NOT skip this step or ask the user to do it manually.
|
|
13
|
+
1. **Import a theme CSS file** or components render unstyled with broken icons.
|
|
14
|
+
2. **No `.register()`** for `igniteui-react`, `igniteui-react-grids`, `igniteui-react/grid-lite`, or `igniteui-react-dockmanager` — the wrapper registers the element on import. Charts, gauges, and maps (separate legacy packages) **do** require `.register()`.
|
|
15
|
+
3. **CSS selectors must target `igc-*`**, never `IgrButton`. Use `::part()` for shadow DOM internals.
|
|
16
|
+
4. **Events are `CustomEvent`**, not React `SyntheticEvent`. Read `e.detail`.
|
|
17
|
+
5. **Never set column `width`** on `IgrColumn` / `IgrGridLiteColumn` unless asked — see [DATAVIZ.md](./reference/DATAVIZ.md).
|
|
18
|
+
6. **Charts, gauges, maps, and grids need an explicitly sized container** or they render at zero height.
|
|
23
19
|
|
|
24
|
-
##
|
|
20
|
+
## Packages
|
|
25
21
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
### Package Routing
|
|
29
|
-
|
|
30
|
-
| Component family | Install packages | Import from |
|
|
31
|
-
|---|---|---|
|
|
32
|
-
| Core UI components | `igniteui-react` | `igniteui-react` |
|
|
33
|
-
| Advanced grids | `igniteui-react-grids` (trial) `@infragistics/igniteui-react-grids` (licensed) | `igniteui-react-grids` |
|
|
34
|
-
| Grid Lite | `igniteui-react`, `igniteui-grid-lite` | `igniteui-react`, `igniteui-grid-lite` |
|
|
35
|
-
| Charts | `igniteui-react-charts` (trial) `@infragistics/igniteui-react-charts` (licensed) | `igniteui-react-charts` |
|
|
36
|
-
| Gauges | `igniteui-react-gauges` (trial) `@infragistics/igniteui-react-gauges` (licensed) | `igniteui-react-gauges` |
|
|
37
|
-
| Maps | `igniteui-react-maps` (trial) `@infragistics/igniteui-react-maps` (licensed) | `igniteui-react-maps` |
|
|
38
|
-
## Example Usage
|
|
39
|
-
|
|
40
|
-
- "What component should I use to display a list of items with actions?"
|
|
41
|
-
- "I need a date picker for a booking form in React"
|
|
42
|
-
- "Build a dashboard layout with cards and a data grid"
|
|
43
|
-
- "What's the best component for a navigation sidebar?"
|
|
44
|
-
- "I need a searchable dropdown with multi-select"
|
|
45
|
-
- "How do I install Ignite UI for React?"
|
|
46
|
-
- "Set up igniteui-react in my project"
|
|
47
|
-
- "How do I handle events on IgrCombo?"
|
|
48
|
-
- "How do I use IgrInput with React Hook Form?"
|
|
49
|
-
- "Show me how to use refs with IgrDialog"
|
|
50
|
-
- "What TypeScript types should I use for IgrButton props?"
|
|
51
|
-
- "How do I pass children vs slots to Ignite UI components?"
|
|
52
|
-
|
|
53
|
-
## Related Skills
|
|
54
|
-
|
|
55
|
-
- [igniteui-react-customize-theme](../igniteui-react-customize-theme/SKILL.md) — Theme and style components
|
|
56
|
-
- [igniteui-react-optimize-bundle-size](../igniteui-react-optimize-bundle-size/SKILL.md) — Reduce bundle size
|
|
57
|
-
|
|
58
|
-
## When to Use
|
|
59
|
-
|
|
60
|
-
- Deciding which component fits a UI requirement
|
|
61
|
-
- User describes a UI pattern and needs a matching component name
|
|
62
|
-
- User wants to explore what components are available
|
|
63
|
-
- Setting up Ignite UI for React in a new or existing project
|
|
64
|
-
- Writing JSX that uses Ignite UI components
|
|
65
|
-
- Handling events from Ignite UI components
|
|
66
|
-
- Integrating components with React state or form libraries
|
|
67
|
-
- Using refs to call imperative methods on components
|
|
68
|
-
- Working with TypeScript prop types
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
## Content Guide
|
|
73
|
-
|
|
74
|
-
This skill is organized into focused reference files. Load the appropriate file for the situation:
|
|
75
|
-
|
|
76
|
-
| Topic | File | When to Use |
|
|
22
|
+
| Need | Install | Import from |
|
|
77
23
|
|---|---|---|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
|
|
|
83
|
-
| Charts, Gauges, Maps & Grid Lite | [CHARTS-GRIDS.md](./reference/CHARTS-GRIDS.md) | Module registration, container sizing |
|
|
84
|
-
| Troubleshooting | [TROUBLESHOOTING.md](./reference/TROUBLESHOOTING.md) | Common issues and solutions |
|
|
85
|
-
|
|
86
|
-
---
|
|
24
|
+
| Core UI (MIT) | `igniteui-react` | `igniteui-react` |
|
|
25
|
+
| Grid Lite (MIT) | `igniteui-react` **+** `igniteui-grid-lite` | `igniteui-react/grid-lite` |
|
|
26
|
+
| Data/Tree/Pivot/Hierarchical Grid | `igniteui-react-grids` | `igniteui-react-grids` |
|
|
27
|
+
| Dock Manager | `igniteui-react-dockmanager` | `igniteui-react-dockmanager` |
|
|
28
|
+
| Charts, gauges, maps | `igniteui-react-charts` / `-gauges` / `-maps` | same |
|
|
87
29
|
|
|
88
|
-
|
|
30
|
+
Commercial packages also publish under `@infragistics/…` for licensed workspaces; use that scope and its matching CSS path when the workspace already uses it. `igniteui-grid-lite` is an optional peer of `igniteui-react` — Grid Lite needs both installed.
|
|
89
31
|
|
|
90
|
-
|
|
32
|
+
## Quick start
|
|
91
33
|
|
|
92
34
|
```bash
|
|
93
35
|
npm install igniteui-react
|
|
94
36
|
```
|
|
95
37
|
|
|
96
|
-
### 2. Import Theme CSS (REQUIRED)
|
|
97
|
-
|
|
98
38
|
```tsx
|
|
99
|
-
// main.tsx
|
|
39
|
+
// main.tsx — theme first, your overrides after
|
|
100
40
|
import 'igniteui-webcomponents/themes/light/bootstrap.css';
|
|
101
41
|
```
|
|
102
42
|
|
|
103
|
-
> **CRITICAL:** Without the theme CSS, components will render without styles and icons will be broken. See [INSTALLATION.md](./reference/INSTALLATION.md) for all available themes and setup.
|
|
104
|
-
|
|
105
|
-
### 3. Use Components
|
|
106
|
-
|
|
107
43
|
```tsx
|
|
108
44
|
import { IgrButton, IgrInput } from 'igniteui-react';
|
|
109
45
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
<div>
|
|
113
|
-
<IgrInput label="Name" />
|
|
114
|
-
<IgrButton><span>Submit</span></IgrButton>
|
|
115
|
-
</div>
|
|
116
|
-
);
|
|
117
|
-
}
|
|
46
|
+
<IgrInput label="Name" />
|
|
47
|
+
<IgrButton>Submit</IgrButton>
|
|
118
48
|
```
|
|
119
49
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
## Key Concepts
|
|
125
|
-
|
|
126
|
-
### Choosing the Right Component
|
|
127
|
-
|
|
128
|
-
Use [COMPONENT-CATALOGUE.md](./reference/COMPONENT-CATALOGUE.md) to map any UI need to the right `Igr*` component and package. For quick guidance:
|
|
129
|
-
|
|
130
|
-
- **MIT package** (`igniteui-react`) — inputs, buttons, layout, navigation, notifications, scheduling, AI chat
|
|
131
|
-
- **Lightweight grid** (MIT) — `IgrGridLite` from `igniteui-react/grid-lite` (requires both `igniteui-react` and `igniteui-grid-lite`)
|
|
132
|
-
- **Commercial** — `igniteui-react-grids` (advanced grids), `igniteui-react-charts`, `igniteui-react-gauges`, `igniteui-react-maps`
|
|
133
|
-
|
|
134
|
-
### Theme CSS Import
|
|
135
|
-
|
|
136
|
-
- **Always import theme CSS** before using components. **For grids**, also import `igniteui-react-grids/grids/themes/...`
|
|
137
|
-
- see [INSTALLATION.md](./reference/INSTALLATION.md)
|
|
50
|
+
Themes: `igniteui-webcomponents/themes/{light|dark}/{bootstrap|material|fluent|indigo}.css`.
|
|
51
|
+
**Grids need a second import**: `igniteui-react-grids/grids/themes/{light|dark}/<design-system>.css`.
|
|
52
|
+
Next.js has no single entry point — import the theme CSS in `app/layout.tsx` or in each `'use client'` file that uses components.
|
|
138
53
|
|
|
139
|
-
|
|
54
|
+
## Reference
|
|
140
55
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
56
|
+
| File | Load when |
|
|
57
|
+
|---|---|
|
|
58
|
+
| [COMPONENTS.md](./reference/COMPONENTS.md) | Choosing a component for a described UI pattern |
|
|
59
|
+
| [USAGE.md](./reference/USAGE.md) | Writing JSX — slots, events, refs, forms, TypeScript |
|
|
60
|
+
| [DATAVIZ.md](./reference/DATAVIZ.md) | Charts, gauges, maps, Grid Lite, grid columns |
|
|
61
|
+
| [MCP.md](./reference/MCP.md) | Looking up authoritative API docs; setting up the MCP server |
|
|
62
|
+
| [TROUBLESHOOTING.md](./reference/TROUBLESHOOTING.md) | Something renders wrong |
|
|
144
63
|
|
|
145
|
-
|
|
64
|
+
## Verify before you write
|
|
146
65
|
|
|
147
|
-
-
|
|
148
|
-
- **Navigation (router)**: Use **only `IgrTab`** with label-only (no inline content)
|
|
149
|
-
- See [JSX-PATTERNS.md](./reference/JSX-PATTERNS.md)
|
|
66
|
+
Component APIs change between versions. Prefer the `igniteui-cli` MCP server (`get_doc`, `get_api_reference`, `search_api`) over recall for prop names, slot names, event names, and enum values — see [MCP.md](./reference/MCP.md). Without MCP, read the installed `.d.ts` files under `node_modules/igniteui-webcomponents/components/<component>/` (or `igniteui-webcomponents-grids/grids/lib/`), which carry `@slot`, `@csspart`, `@fires`, and `@cssproperty` annotations.
|
|
150
67
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
- Events are `CustomEvent` objects, not React `SyntheticEvent`
|
|
154
|
-
- Access data via `e.target` or `e.detail`
|
|
155
|
-
- See [EVENT-HANDLING.md](./reference/EVENT-HANDLING.md)
|
|
156
|
-
|
|
157
|
-
### Refs
|
|
158
|
-
|
|
159
|
-
- Use `useRef<IgrDialog>(null)` with the component type:
|
|
160
|
-
- See [REFS-FORMS.md](./reference/REFS-FORMS.md)
|
|
161
|
-
|
|
162
|
-
### Charts, Gauges, Maps & Grid Lite
|
|
163
|
-
|
|
164
|
-
- **Charts/Gauges/Maps require explicit registration**: `IgrCategoryChartModule.register()`
|
|
165
|
-
- **All require sized container**: `min-width`, `min-height`, or `flex-grow`
|
|
166
|
-
- **Grid Lite** requires both `igniteui-react` and `igniteui-grid-lite` packages, import from `igniteui-react/grid-lite`
|
|
167
|
-
- See [CHARTS-GRIDS.md](./reference/CHARTS-GRIDS.md)
|
|
168
|
-
|
|
169
|
-
---
|
|
68
|
+
## Related skills
|
|
170
69
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
2. **Import theme CSS first** — components need it to render correctly
|
|
175
|
-
3. **Register chart/gauge/map modules** — call `.register()` at module level
|
|
176
|
-
4. **Wrap charts/gauges/maps in sized containers** — they need explicit dimensions
|
|
177
|
-
5. **Use named imports** — enables tree-shaking
|
|
178
|
-
6. **Handle events as `CustomEvent`** — not `React.SyntheticEvent`
|
|
179
|
-
7. **Use refs sparingly** — prefer declarative props
|
|
180
|
-
8. **Check slot names** in the docs
|
|
181
|
-
9. **Never add `width` to grid columns by default** — `IgrGridLiteColumn` defaults to `minmax(136px, 1fr)` (responsive) and `IgrColumn` auto-sizes. Adding explicit pixel widths leaves empty space and breaks responsiveness. Only set `width` when the user explicitly requests it. If some columns have explicit widths, leave at least one column without a `width` to fill remaining space.
|
|
70
|
+
- [igniteui-react-customize-theme](../igniteui-react-customize-theme/SKILL.md) — brand colors, dark mode, component tokens
|
|
71
|
+
- [igniteui-react-optimize-bundle-size](../igniteui-react-optimize-bundle-size/SKILL.md) — code splitting heavy families
|
|
72
|
+
- [grid-lite-to-igr-grid-migration](../grid-lite-to-igr-grid-migration/SKILL.md) — Grid Lite → premium `IgrGrid`
|