igniteui-cli 15.2.2 → 15.3.1-beta.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/lib/commands/build.js +7 -12
- package/package.json +7 -7
- package/templates/blazor/igb/projects/ai-config/files/skills/AGENTS.md +0 -5
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/SKILL.md +2 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/charts.md +7 -35
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/data-display.md +0 -54
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/feedback.md +0 -38
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/form-controls.md +0 -68
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout-manager.md +1 -124
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout.md +0 -62
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/grid-migration.md +322 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/SKILL.md +1 -1
- package/templates/react/igr-ts/projects/_base/files/package.json +1 -0
- package/templates/react/igr-ts/projects/_base/files/src/app/app.tsx +4 -2
- package/templates/react/igr-ts/projects/_base/files/src/setupTests.ts +12 -0
- package/templates/react/igr-ts/projects/_base/files/styles.css +6 -0
- package/templates/react/igr-ts/projects/_base_with_home/files/index.html +2 -1
- package/templates/react/igr-ts/projects/_base_with_home/files/src/app/home/home.tsx +60 -10
- package/templates/react/igr-ts/projects/_base_with_home/files/src/app/home/style.module.css +79 -20
- package/templates/react/igr-ts/projects/ai-config/files/skills/grid-lite-to-igr-grid-migration/SKILL.md +274 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/SKILL.md +0 -8
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/CHARTS-GRIDS.md +6 -36
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/COMPONENT-CATALOGUE.md +8 -142
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/EVENT-HANDLING.md +2 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/SKILL.md +7 -14
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/CSS-THEMING.md +2 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/MCP-SERVER.md +0 -8
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/SKILL.md +2 -2
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/reference/component-mapping.md +60 -74
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/reference/gotchas.md +2 -2
- package/templates/react/igr-ts/projects/empty/index.js +2 -2
- package/templates/react/igr-ts/projects/side-nav/files/src/app/app-routes.tsx +5 -0
- package/templates/react/igr-ts/projects/side-nav/files/src/app/app.css +82 -0
- package/templates/react/igr-ts/projects/side-nav/files/src/app/app.tsx +104 -0
- package/templates/react/igr-ts/projects/side-nav/files/src/app/home/home.tsx +69 -0
- package/templates/react/igr-ts/projects/side-nav/files/src/app/home/style.module.css +105 -0
- package/templates/react/igr-ts/projects/{top-nav → side-nav}/index.d.ts +2 -2
- package/templates/react/igr-ts/projects/{top-nav → side-nav}/index.js +7 -7
- package/templates/react/igr-ts/projects/side-nav-auth/files/index.html +19 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/app-routes.tsx +24 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/app.css +84 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/app.tsx +124 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/AuthContext.tsx +73 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/AuthGuard.tsx +14 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Login.module.css +93 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Login.tsx +69 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/LoginBar.module.css +42 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/LoginBar.tsx +44 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/LoginDialog.module.css +14 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/LoginDialog.tsx +49 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Register.module.css +74 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Register.tsx +67 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/models/external-login.ts +10 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/models/login.ts +4 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/models/register-info.ts +6 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/models/user.ts +19 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/Profile.module.css +87 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/Profile.tsx +42 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectFacebook.tsx +44 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectGoogle.tsx +40 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectMicrosoft.tsx +40 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/services/authentication.ts +37 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/services/external-auth-config.ts +44 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/services/externalAuth.ts +272 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/services/fakeBackend.ts +88 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/services/jwtUtil.ts +10 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/services/pkce.ts +29 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/services/userStore.ts +39 -0
- package/templates/react/igr-ts/projects/side-nav-auth/index.d.ts +15 -0
- package/templates/react/igr-ts/projects/side-nav-auth/index.js +46 -0
- package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/app-routes.tsx +5 -0
- package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/app.css +109 -0
- package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/app.test.tsx +20 -0
- package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/app.tsx +81 -0
- package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/home/home.tsx +69 -0
- package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/home/style.module.css +105 -0
- package/templates/react/igr-ts/projects/side-nav-mini/index.d.ts +15 -0
- package/templates/react/igr-ts/projects/side-nav-mini/index.js +46 -0
- package/templates/react/igr-ts/projects/side-nav-mini-auth/files/src/app/app.css +106 -0
- package/templates/react/igr-ts/projects/side-nav-mini-auth/files/src/app/app.tsx +101 -0
- package/templates/react/igr-ts/projects/side-nav-mini-auth/index.d.ts +15 -0
- package/templates/react/igr-ts/projects/side-nav-mini-auth/index.js +50 -0
- package/templates/webcomponents/igc-ts/projects/_base/files/src/app/app.ts +6 -1
- package/templates/webcomponents/igc-ts/projects/_base/files/styles.css +1 -0
- package/templates/webcomponents/igc-ts/projects/_base_with_home/files/index.html +2 -0
- package/templates/webcomponents/igc-ts/projects/_base_with_home/files/src/app/home/home.ts +103 -9
- package/templates/webcomponents/igc-ts/projects/_base_with_home/files/src/assets/wc.png +0 -0
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-choose-components/SKILL.md +122 -160
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-customize-component-theme/SKILL.md +83 -311
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-customize-component-theme/references/mcp-setup.md +69 -0
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-generate-from-image-design/SKILL.md +4 -1
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-generate-from-image-design/references/component-mapping.md +60 -61
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-generate-from-image-design/references/gotchas.md +15 -11
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-migrate-grid-lite-to-premium/SKILL.md +446 -0
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-optimize-bundle-size/SKILL.md +23 -274
- package/templates/webcomponents/igc-ts/projects/empty/index.js +1 -1
- package/templates/webcomponents/igc-ts/projects/side-nav/files/index.html +21 -0
- package/templates/webcomponents/igc-ts/projects/side-nav/files/src/app/app-routing.ts +9 -0
- package/templates/webcomponents/igc-ts/projects/side-nav/files/src/app/app.ts +192 -22
- package/templates/webcomponents/igc-ts/projects/side-nav/files/src/app/home/home.ts +175 -0
- package/templates/webcomponents/igc-ts/projects/side-nav/index.js +1 -1
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/index.html +25 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/app-routing.ts +37 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/app.ts +251 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/login-bar/login-bar.ts +124 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/login-dialog/login-dialog.ts +253 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/models/external-login.ts +10 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/models/login.ts +4 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/models/register-info.ts +6 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/models/user.ts +19 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/services/authentication.ts +37 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/services/external-auth-config.ts +44 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/services/externalAuth.ts +272 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/services/fakeBackend.ts +88 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/services/jwtUtil.ts +10 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/services/pkce.ts +29 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/services/userStore.ts +39 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/profile/profile.ts +142 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/redirect/redirect-facebook.ts +57 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/redirect/redirect-google.ts +53 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/redirect/redirect-microsoft.ts +53 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/index.d.ts +15 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/index.js +46 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-mini/files/src/app/app-routing.ts +13 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-mini/files/src/app/app.ts +238 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-mini/index.d.ts +14 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-mini/index.js +45 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-mini-auth/files/src/app/app.ts +258 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-mini-auth/index.d.ts +15 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-mini-auth/index.js +50 -0
- package/templates/react/igr-ts/projects/top-nav/files/src/app/app.css +0 -62
- package/templates/react/igr-ts/projects/top-nav/files/src/app/app.tsx +0 -18
- package/templates/react/igr-ts/projects/top-nav/files/src/components/navigation-header/index.tsx +0 -19
- /package/templates/react/igr-ts/projects/{top-nav → side-nav}/files/src/app/app.test.tsx +0 -0
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
# Grid Migration - Grid Lite → Premium IgbGrid
|
|
2
|
+
|
|
3
|
+
> **Part of the [`igniteui-blazor-grids`](../SKILL.md) skill hub.**
|
|
4
|
+
> For `IgbGrid` setup and column configuration — see [`structure.md`](./structure.md).
|
|
5
|
+
> For specialized grid types including `IgbGridLite` — see [`types.md`](./types.md).
|
|
6
|
+
> For cell and row editing after migration — see [`editing.md`](./editing.md).
|
|
7
|
+
|
|
8
|
+
## Contents
|
|
9
|
+
|
|
10
|
+
- [When to Migrate from Grid Lite to IgbGrid](#when-to-migrate-from-grid-lite-to-igbgrid)
|
|
11
|
+
- [Setup](#setup)
|
|
12
|
+
- [Minimal Migration Example](#minimal-migration-example)
|
|
13
|
+
- [Component and API Changes](#component-and-api-changes)
|
|
14
|
+
- [Cell Templates](#cell-templates)
|
|
15
|
+
- [Header Templates](#header-templates)
|
|
16
|
+
- [Remote Data](#remote-data)
|
|
17
|
+
- [Programmatic Sort / Filter](#programmatic-sort--filter)
|
|
18
|
+
- [Common Enterprise Features](#common-enterprise-features)
|
|
19
|
+
- [Cleanup After Migration](#cleanup-after-migration)
|
|
20
|
+
- [Key Rules](#key-rules)
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## When to Migrate from Grid Lite to IgbGrid
|
|
25
|
+
|
|
26
|
+
Migrate when you need any of the following features (not available in `IgbGridLite`):
|
|
27
|
+
|
|
28
|
+
| Feature | Grid Lite | Premium Grid (`IgbGrid`) |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| Cell editing | ✗ | ✓ `Editable` on column, `RowEditable` on grid |
|
|
31
|
+
| Batch editing (with undo) | ✗ | ✗ (not supported in Blazor) |
|
|
32
|
+
| Row adding / deleting | ✗ | ✓ `RowEditable` + `IgbActionStrip` |
|
|
33
|
+
| Row selection | ✗ | ✓ `RowSelection="GridSelectionMode.Single|Multiple"` |
|
|
34
|
+
| Cell selection | ✗ | ✓ `CellSelection` |
|
|
35
|
+
| Column selection | ✗ | ✓ `ColumnSelection` |
|
|
36
|
+
| Paging | ✗ | ✓ `IgbPaginator` child |
|
|
37
|
+
| GroupBy | ✗ | ✓ `GroupingExpressions` (IgbGrid only) |
|
|
38
|
+
| Column summaries | ✗ | ✓ `HasSummary` on `IgbColumn` |
|
|
39
|
+
| Column pinning | ✗ | ✓ `Pinned` on `IgbColumn` |
|
|
40
|
+
| Column moving | ✗ | ✓ `Moving="true"` on grid |
|
|
41
|
+
| Master-detail rows | ✗ | ✓ `IgbGrid` row expansion |
|
|
42
|
+
| Excel / CSV export (toolbar) | ✗ | ✓ `IgbGridToolbarExporter` |
|
|
43
|
+
| Column hiding toolbar | ✗ | ✓ `IgbGridToolbarHiding` |
|
|
44
|
+
| Column pinning toolbar | ✗ | ✓ `IgbGridToolbarPinning` |
|
|
45
|
+
| Advanced filtering UI | ✗ | ✓ `IgbGridToolbarAdvancedFiltering` |
|
|
46
|
+
| State persistence | ✗ | ✓ `IgbGridState` |
|
|
47
|
+
| Clipboard operations | ✗ | ✓ `ClipboardOptions` |
|
|
48
|
+
| Action strip | ✗ | ✓ `IgbActionStrip` |
|
|
49
|
+
| Row drag and drop | ✗ | ✓ `RowDraggable="true"` |
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Setup
|
|
54
|
+
|
|
55
|
+
### 1. Replace the NuGet package registration
|
|
56
|
+
|
|
57
|
+
```csharp
|
|
58
|
+
// Remove:
|
|
59
|
+
builder.Services.AddIgniteUIBlazor(typeof(IgbGridLiteModule));
|
|
60
|
+
|
|
61
|
+
// Add:
|
|
62
|
+
builder.Services.AddIgniteUIBlazor(typeof(IgbGridModule));
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 2. Replace the CSS link in `index.html`
|
|
66
|
+
|
|
67
|
+
```html
|
|
68
|
+
<!-- Remove: -->
|
|
69
|
+
<link href="_content/IgniteUI.Blazor.GridLite/css/themes/light/bootstrap.css" rel="stylesheet" />
|
|
70
|
+
|
|
71
|
+
<!-- Add: -->
|
|
72
|
+
<link href="_content/IgniteUI.Blazor/themes/light/bootstrap.css" rel="stylesheet" />
|
|
73
|
+
<link href="_content/IgniteUI.Blazor/themes/grid/light/bootstrap.css" rel="stylesheet" />
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 3. Update `_Imports.razor`
|
|
77
|
+
|
|
78
|
+
`IgniteUI.Blazor.Controls` covers both `IgbGridLite` and `IgbGrid` — no change needed if already present.
|
|
79
|
+
|
|
80
|
+
```razor
|
|
81
|
+
@using IgniteUI.Blazor.Controls
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Minimal Migration Example
|
|
87
|
+
|
|
88
|
+
```razor
|
|
89
|
+
<!-- Before: -->
|
|
90
|
+
<IgbGridLite TItem="Product" Data="@products">
|
|
91
|
+
<IgbGridLiteColumn Field="Name" Header="Name" DataType="GridLiteColumnDataType.String" Sortable Filterable Resizable />
|
|
92
|
+
<IgbGridLiteColumn Field="Price" Header="Price" DataType="GridLiteColumnDataType.Number" />
|
|
93
|
+
</IgbGridLite>
|
|
94
|
+
|
|
95
|
+
<!-- After: -->
|
|
96
|
+
<IgbGrid @ref="grid" Data="@products" PrimaryKey="Id" AutoGenerate="false"
|
|
97
|
+
Width="100%" Height="600px" AllowFiltering="true">
|
|
98
|
+
<IgbColumn Field="Name" Header="Name" DataType="GridColumnDataType.String" Sortable="true" Filterable="true" Resizable="true" />
|
|
99
|
+
<IgbColumn Field="Price" Header="Price" DataType="GridColumnDataType.Number" Sortable="true" />
|
|
100
|
+
</IgbGrid>
|
|
101
|
+
|
|
102
|
+
@code {
|
|
103
|
+
private IgbGrid grid = default!;
|
|
104
|
+
private List<Product> products = new();
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Key additions vs Grid Lite:**
|
|
109
|
+
- `PrimaryKey` — required for editing, selection, and row-targeted APIs
|
|
110
|
+
- `Height` — required for row virtualization
|
|
111
|
+
- `AllowFiltering="true"` on the grid — enables the filter row UI; `Filterable="true"` on a column opts that column in
|
|
112
|
+
- `@ref` — required for programmatic API access
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Component and API Changes
|
|
117
|
+
|
|
118
|
+
| Grid Lite | Premium Grid |
|
|
119
|
+
|---|---|
|
|
120
|
+
| `IgbGridLite` | `IgbGrid` |
|
|
121
|
+
| `IgbGridLiteColumn` | `IgbColumn` |
|
|
122
|
+
| `GridLiteColumnDataType` | `GridColumnDataType` |
|
|
123
|
+
| `IgbGridLiteModule` | `IgbGridModule` |
|
|
124
|
+
| `IgbGridLiteSortingExpression` | `IgbSortingExpression` |
|
|
125
|
+
| `IgbGridLiteFilterExpression` | `IgbFilteringExpression` |
|
|
126
|
+
| Column `Key` (in sort/filter objects) | Column `FieldName` (in sort/filter objects) |
|
|
127
|
+
| `TItem` generic parameter | `TItem` (unchanged) |
|
|
128
|
+
| No `PrimaryKey` | `PrimaryKey` required for most features |
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Cell Templates
|
|
133
|
+
|
|
134
|
+
Grid Lite has no cell templates. In `IgbGrid`, use the `BodyTemplate` render fragment on `IgbColumn`:
|
|
135
|
+
|
|
136
|
+
```razor
|
|
137
|
+
<IgbColumn Field="Status" Header="Status">
|
|
138
|
+
<BodyTemplate>
|
|
139
|
+
@{
|
|
140
|
+
var cell = (IgbCellTemplateContext)context;
|
|
141
|
+
var status = cell.Cell.Value?.ToString();
|
|
142
|
+
}
|
|
143
|
+
<span style="color: @(status == "Active" ? "green" : "red")">@status</span>
|
|
144
|
+
</BodyTemplate>
|
|
145
|
+
</IgbColumn>
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
| | Grid Lite | Premium Grid |
|
|
149
|
+
|---|---|---|
|
|
150
|
+
| Cell template | Not supported | `BodyTemplate` render fragment |
|
|
151
|
+
| Cell value | — | `((IgbCellTemplateContext)context).Cell.Value` |
|
|
152
|
+
| Row data | — | `((IgbCellTemplateContext)context).Cell.Row.Data` |
|
|
153
|
+
| Edit template | — | `InlineEditorTemplate` render fragment |
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Header Templates
|
|
158
|
+
|
|
159
|
+
Grid Lite has no header templates. In `IgbGrid`, use the `HeaderTemplate` render fragment:
|
|
160
|
+
|
|
161
|
+
```razor
|
|
162
|
+
<IgbColumn Field="Price" Header="Price">
|
|
163
|
+
<HeaderTemplate>
|
|
164
|
+
<strong>@((context as IgbColumnTemplateContext)?.Column.Header)</strong>
|
|
165
|
+
</HeaderTemplate>
|
|
166
|
+
</IgbColumn>
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Remote Data
|
|
172
|
+
|
|
173
|
+
For server-side sort/filter, handle the `SortingDone` / `FilteringDone` events to reload data:
|
|
174
|
+
```razor
|
|
175
|
+
<IgbGrid @ref="grid" Data="@data" PrimaryKey="Id" Height="600px"
|
|
176
|
+
SortingDone="OnSortingDone" FilteringDone="OnFilteringDone">
|
|
177
|
+
</IgbGrid>
|
|
178
|
+
|
|
179
|
+
@code {
|
|
180
|
+
private IgbGrid grid = default!;
|
|
181
|
+
private List<MyItem> data = new();
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
private async Task OnSortingDone(IgbSortingExpressionEventArgs args)
|
|
185
|
+
{
|
|
186
|
+
data = await DataService.SortAsync(args.Detail);
|
|
187
|
+
StateHasChanged();
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
private async Task OnFilteringDone(IgbFilteringExpressionsTreeEventArgs args)
|
|
191
|
+
{
|
|
192
|
+
data = await DataService.FilterAsync(args.Detail);
|
|
193
|
+
StateHasChanged();
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Programmatic Sort / Filter
|
|
201
|
+
|
|
202
|
+
```razor
|
|
203
|
+
@code {
|
|
204
|
+
private IgbGrid grid = default!;
|
|
205
|
+
|
|
206
|
+
// Sort
|
|
207
|
+
private async Task SortByName()
|
|
208
|
+
{
|
|
209
|
+
await grid.SortAsync(new IgbSortingExpression[]
|
|
210
|
+
{
|
|
211
|
+
new IgbSortingExpression { FieldName = "Name", Dir = SortingDirection.Asc }
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
private async Task ClearSorting() => await grid.ClearSortAsync();
|
|
216
|
+
|
|
217
|
+
// Filter
|
|
218
|
+
private void FilterActive()
|
|
219
|
+
{
|
|
220
|
+
var tree = new IgbFilteringExpressionsTree() { Operator = FilteringLogic.And };
|
|
221
|
+
tree.FilteringOperands = new IgbFilteringExpression[]
|
|
222
|
+
{
|
|
223
|
+
new IgbFilteringExpression { FieldName = "IsActive", ConditionName = "true", SearchVal = true }
|
|
224
|
+
};
|
|
225
|
+
grid.FilteringExpressionsTree = tree;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
private async Task ClearFilters() => await grid.ClearFilterAsync();
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
> In Grid Lite, sort/filter expressions used a `Key` property. In `IgbGrid`, use `FieldName`.
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## Common Enterprise Features
|
|
237
|
+
|
|
238
|
+
### Editing
|
|
239
|
+
|
|
240
|
+
```razor
|
|
241
|
+
<IgbGrid Data="@data" PrimaryKey="Id" RowEditable="true" Height="600px">
|
|
242
|
+
<IgbColumn Field="Name" Editable="true" />
|
|
243
|
+
<IgbColumn Field="Price" Editable="true" DataType="GridColumnDataType.Number" />
|
|
244
|
+
</IgbGrid>
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
See [`editing.md`](./editing.md) for cell editing, row editing, validation, and custom editors.
|
|
248
|
+
|
|
249
|
+
### Row Selection
|
|
250
|
+
|
|
251
|
+
```razor
|
|
252
|
+
<IgbGrid Data="@data" PrimaryKey="Id" RowSelection="GridSelectionMode.Multiple" Height="600px">
|
|
253
|
+
<IgbColumn Field="Name" />
|
|
254
|
+
</IgbGrid>
|
|
255
|
+
|
|
256
|
+
@code {
|
|
257
|
+
// Read selected rows via grid.SelectedRows
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Paging
|
|
262
|
+
|
|
263
|
+
```razor
|
|
264
|
+
<IgbGrid Data="@data" PrimaryKey="Id" Height="600px">
|
|
265
|
+
<IgbPaginator PerPage="15" />
|
|
266
|
+
<IgbColumn Field="Name" />
|
|
267
|
+
</IgbGrid>
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
See [`paging-remote.md`](./paging-remote.md) for remote paging and paginator configuration.
|
|
271
|
+
|
|
272
|
+
### Summaries
|
|
273
|
+
|
|
274
|
+
```razor
|
|
275
|
+
<IgbColumn Field="Price" DataType="GridColumnDataType.Number" HasSummary="true" />
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### Toolbar + Export
|
|
279
|
+
|
|
280
|
+
```razor
|
|
281
|
+
<IgbGrid Data="@data" PrimaryKey="Id" Height="600px">
|
|
282
|
+
<IgbGridToolbar>
|
|
283
|
+
<IgbGridToolbarTitle>Products</IgbGridToolbarTitle>
|
|
284
|
+
<IgbGridToolbarActions>
|
|
285
|
+
<IgbGridToolbarHiding />
|
|
286
|
+
<IgbGridToolbarPinning />
|
|
287
|
+
<IgbGridToolbarAdvancedFiltering />
|
|
288
|
+
<IgbGridToolbarExporter ExportExcel="true" ExportCSV="true" />
|
|
289
|
+
</IgbGridToolbarActions>
|
|
290
|
+
</IgbGridToolbar>
|
|
291
|
+
<IgbColumn Field="Name" />
|
|
292
|
+
<IgbColumn Field="Price" />
|
|
293
|
+
</IgbGrid>
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
See [`features.md`](./features.md) for toolbar customization, export events, grouping, summaries, and action strip.
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## Cleanup After Migration
|
|
301
|
+
|
|
302
|
+
1. Remove `IgbGridLiteModule` registration from `Program.cs`.
|
|
303
|
+
2. Remove the `IgniteUI.Blazor.GridLite` CSS `<link>` from `index.html`.
|
|
304
|
+
3. Rename all `IgbGridLite` → `IgbGrid`, `IgbGridLiteColumn` → `IgbColumn` in `.razor` files.
|
|
305
|
+
4. Replace `GridLiteColumnDataType` → `GridColumnDataType` enum values.
|
|
306
|
+
5. In sort/filter expression objects, rename the `Key` property → `FieldName`.
|
|
307
|
+
6. Remove the `IgniteUI.Blazor.GridLite` NuGet package if no `IgbGridLite` instances remain:
|
|
308
|
+
```bash
|
|
309
|
+
dotnet remove package IgniteUI.Blazor.GridLite
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## Key Rules
|
|
315
|
+
|
|
316
|
+
- `PrimaryKey` is required for editing, selection, row APIs, and `IgbActionStrip` — Grid Lite had no equivalent.
|
|
317
|
+
- `Height` (or a CSS-constrained container) is required for row virtualization in `IgbGrid`.
|
|
318
|
+
- `AllowFiltering="true"` must be set on the grid to show the filter row; `Filterable="true"` on a column opts that column in.
|
|
319
|
+
- Cell and header templates use Blazor render fragments (`BodyTemplate`, `HeaderTemplate`, `InlineEditorTemplate`) — not callbacks or delegates.
|
|
320
|
+
- For remote data, handle `SortingDone` / `FilteringDone` and reload `Data` from your server.
|
|
321
|
+
- `IgbColumn.FieldName` (in expression objects) replaces `IgbGridLiteColumn.Key` used in Grid Lite sort/filter expressions.
|
|
322
|
+
|
package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/SKILL.md
CHANGED
|
@@ -252,7 +252,7 @@ Base CSS and instructions on what the MCP tools return and what the reference fi
|
|
|
252
252
|
7. **Use `igc-*` selectors in CSS**, not Razor component names such as `IgbButton`
|
|
253
253
|
8. **Use `::part()` only after confirming part names with Blazor docs**, and prefer design tokens when a token exists
|
|
254
254
|
9. **Surface color must match the variant**; use a light surface for `light` and a dark surface for `dark`
|
|
255
|
-
10. **Only one built-in theme CSS file should be active at a time
|
|
255
|
+
10. **Only one built-in theme CSS file should be active at a time**; link only one theme stylesheet in the host page (e.g., `_content/IgniteUI.Blazor/themes/light/bootstrap.css`) to avoid conflicts
|
|
256
256
|
|
|
257
257
|
## Related Skills
|
|
258
258
|
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@testing-library/jest-dom": "^6.9.1",
|
|
15
15
|
"@testing-library/react": "^16.3.0",
|
|
16
|
+
"@igniteui/material-icons-extended": "^3.0.2",
|
|
16
17
|
"element-internals-polyfill": "^3.0.2",
|
|
17
18
|
"functions-have-names": "^1.2.3",
|
|
18
19
|
"igniteui-react": "~19.7.0",
|
|
@@ -4,6 +4,18 @@ import ResizeObserver from 'resize-observer-polyfill';
|
|
|
4
4
|
export function setupTestMocks() {
|
|
5
5
|
globalThis.ResizeObserver = ResizeObserver;
|
|
6
6
|
|
|
7
|
+
Object.defineProperty(window, 'matchMedia', {
|
|
8
|
+
writable: true,
|
|
9
|
+
value: vi.fn().mockImplementation(query => ({
|
|
10
|
+
matches: true,
|
|
11
|
+
media: query,
|
|
12
|
+
onchange: null,
|
|
13
|
+
addEventListener: vi.fn(),
|
|
14
|
+
removeEventListener: vi.fn(),
|
|
15
|
+
dispatchEvent: vi.fn(),
|
|
16
|
+
})),
|
|
17
|
+
});
|
|
18
|
+
|
|
7
19
|
HTMLElement.prototype.scrollIntoView = vi.fn();
|
|
8
20
|
HTMLElement.prototype.hidePopover = vi.fn();
|
|
9
21
|
HTMLElement.prototype.showPopover = vi.fn();
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>
|
|
7
|
+
<title>Ignite UI for React</title>
|
|
8
|
+
<link href="https://fonts.googleapis.com/css?family=Titillium+Web:300,400,600,700" rel="stylesheet">
|
|
8
9
|
<link rel="stylesheet" href="./styles.css">
|
|
9
10
|
</head>
|
|
10
11
|
<body>
|
|
@@ -1,24 +1,74 @@
|
|
|
1
1
|
import logo from "/logo.svg";
|
|
2
|
+
import { github } from "@igniteui/material-icons-extended";
|
|
3
|
+
import { IgrIcon, registerIconFromText } from "igniteui-react";
|
|
2
4
|
import styles from "./style.module.css";
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
const name = '$(name)';
|
|
6
|
+
registerIconFromText(github.name, github.value, "imx-icons");
|
|
6
7
|
|
|
8
|
+
export default function App() {
|
|
7
9
|
return (
|
|
8
|
-
<
|
|
9
|
-
<
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
<main className={styles.content}>
|
|
11
|
+
<h1 className={styles.header}>Welcome to Ignite UI for React!</h1>
|
|
12
|
+
<h4 className={styles.subject}>
|
|
13
|
+
A complete library of 50+ UI components for building modern web applications with reusable React components.
|
|
14
|
+
</h4>
|
|
15
|
+
<img src={logo} className={styles.logo} alt="Ignite UI for React" />
|
|
16
|
+
|
|
17
|
+
<p className={styles.subtitle}>Discover more at</p>
|
|
18
|
+
<p>
|
|
13
19
|
<a
|
|
14
20
|
className={styles.link}
|
|
15
21
|
target="_blank"
|
|
16
22
|
href="https://www.infragistics.com/products/ignite-ui-react"
|
|
17
23
|
rel="noopener noreferrer"
|
|
18
24
|
>
|
|
19
|
-
|
|
25
|
+
www.infragistics.com/products/ignite-ui-react
|
|
26
|
+
</a>
|
|
27
|
+
</p>
|
|
28
|
+
<p>
|
|
29
|
+
<a
|
|
30
|
+
className={styles.link}
|
|
31
|
+
target="_blank"
|
|
32
|
+
href="https://www.infragistics.com/products/indigo-design"
|
|
33
|
+
rel="noopener noreferrer"
|
|
34
|
+
>
|
|
35
|
+
www.infragistics.com/products/indigo-design
|
|
20
36
|
</a>
|
|
21
|
-
</
|
|
22
|
-
|
|
37
|
+
</p>
|
|
38
|
+
|
|
39
|
+
<p className={styles.subtitle}>We are also on GitHub</p>
|
|
40
|
+
<p className={styles.githubLinks}>
|
|
41
|
+
<span className={styles.githubItem}>
|
|
42
|
+
<IgrIcon
|
|
43
|
+
className={styles.githubIcon}
|
|
44
|
+
name="github"
|
|
45
|
+
collection="imx-icons"
|
|
46
|
+
/>
|
|
47
|
+
<a
|
|
48
|
+
className={styles.githubLink}
|
|
49
|
+
target="_blank"
|
|
50
|
+
href="https://github.com/IgniteUI/igniteui-react"
|
|
51
|
+
rel="noopener noreferrer"
|
|
52
|
+
>
|
|
53
|
+
Ignite UI for React
|
|
54
|
+
</a>
|
|
55
|
+
</span>
|
|
56
|
+
<span className={styles.githubItem}>
|
|
57
|
+
<IgrIcon
|
|
58
|
+
className={styles.githubIcon}
|
|
59
|
+
name="github"
|
|
60
|
+
collection="imx-icons"
|
|
61
|
+
/>
|
|
62
|
+
<a
|
|
63
|
+
className={styles.githubLink}
|
|
64
|
+
target="_blank"
|
|
65
|
+
href="https://github.com/IgniteUI/igniteui-cli"
|
|
66
|
+
rel="noopener noreferrer"
|
|
67
|
+
>
|
|
68
|
+
Ignite UI CLI
|
|
69
|
+
</a>
|
|
70
|
+
</span>
|
|
71
|
+
</p>
|
|
72
|
+
</main>
|
|
23
73
|
);
|
|
24
74
|
}
|
|
@@ -1,36 +1,95 @@
|
|
|
1
|
-
:local(.
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
:local(.content) {
|
|
2
|
+
width: 100%;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-flow: column nowrap;
|
|
5
|
+
align-items: center;
|
|
6
|
+
padding: 24px;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
text-align: center;
|
|
9
|
+
font-family: "Titillium Web", "Segoe UI", Arial, sans-serif;
|
|
10
|
+
color: #000;
|
|
4
11
|
}
|
|
5
12
|
|
|
6
13
|
:local(.header) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
color: #09f;
|
|
15
|
+
font-size: 80px;
|
|
16
|
+
font-weight: 300;
|
|
17
|
+
line-height: 1.2;
|
|
18
|
+
margin: 0 0 16px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:local(.subject) {
|
|
22
|
+
font-size: 28px;
|
|
23
|
+
font-weight: 400;
|
|
24
|
+
line-height: 1.4;
|
|
25
|
+
margin: 0 0 32px;
|
|
26
|
+
max-width: 1120px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:local(.logo) {
|
|
30
|
+
display: block;
|
|
31
|
+
margin-bottom: 32px;
|
|
32
|
+
width: 500px;
|
|
33
|
+
height: 350px;
|
|
34
|
+
max-width: 100%;
|
|
35
|
+
object-fit: contain;
|
|
14
36
|
}
|
|
15
37
|
|
|
16
38
|
:local(.link) {
|
|
17
|
-
|
|
39
|
+
font-size: 16px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:local(.subtitle) {
|
|
43
|
+
font-size: 16px;
|
|
44
|
+
margin: 16px 0 8px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:local(.content) p:nth-last-child(2) {
|
|
48
|
+
padding-top: 16px;
|
|
18
49
|
}
|
|
19
50
|
|
|
20
|
-
:local(.
|
|
21
|
-
padding-top: 1em;
|
|
51
|
+
:local(.githubLinks) {
|
|
22
52
|
display: flex;
|
|
23
|
-
flex-
|
|
53
|
+
flex-flow: row wrap;
|
|
24
54
|
align-items: center;
|
|
25
55
|
justify-content: center;
|
|
26
|
-
|
|
56
|
+
gap: 24px;
|
|
57
|
+
margin: 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:local(.githubItem) {
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-flow: row nowrap;
|
|
63
|
+
align-items: center;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:local(.githubLink) {
|
|
67
|
+
font-size: 16px;
|
|
27
68
|
}
|
|
28
69
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
70
|
+
:local(.githubIcon) {
|
|
71
|
+
width: 24px;
|
|
72
|
+
height: 24px;
|
|
73
|
+
margin-right: 8px;
|
|
74
|
+
flex: 0 0 24px;
|
|
75
|
+
display: block;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:local(.content) p {
|
|
79
|
+
margin: 0 0 8px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@media (max-width: 768px) {
|
|
83
|
+
:local(.header) {
|
|
84
|
+
font-size: 40px;
|
|
32
85
|
}
|
|
33
|
-
|
|
34
|
-
|
|
86
|
+
|
|
87
|
+
:local(.subject) {
|
|
88
|
+
font-size: 20px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:local(.logo) {
|
|
92
|
+
width: 100%;
|
|
93
|
+
height: 240px;
|
|
35
94
|
}
|
|
36
95
|
}
|