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,398 +0,0 @@
|
|
|
1
|
-
# Charts, Gauges, Maps & Grid Lite
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
This reference gives high-level guidance on charts and grids, their key features, and common API members. For detailed documentation, call `get_doc` and `get_api_reference` from `igniteui-cli` with the specific chart, or grid component, or feature you're interested in.
|
|
5
|
-
|
|
6
|
-
## Module Registration
|
|
7
|
-
|
|
8
|
-
> **⚠️ IMPORTANT:** Unlike core UI components (from `igniteui-react`), chart, gauge, and map components from `igniteui-react-charts`, `igniteui-react-gauges`, and `igniteui-react-maps` **require explicit module registration** before use. You must import the corresponding `*Module` class and call `.register()` at the module level (outside the component function).
|
|
9
|
-
>
|
|
10
|
-
> **Grid Lite** (`IgrGridLite` from `igniteui-react/grid-lite`) is a React wrapper component that works like any other React component — no `.register()` needed, but requires both `igniteui-react` and `igniteui-grid-lite` packages installed.
|
|
11
|
-
|
|
12
|
-
### Registration Syntax
|
|
13
|
-
|
|
14
|
-
```tsx
|
|
15
|
-
import { IgrCategoryChart, IgrCategoryChartModule } from 'igniteui-react-charts';
|
|
16
|
-
|
|
17
|
-
// ⚠️ REQUIRED — register the module before using the component
|
|
18
|
-
IgrCategoryChartModule.register();
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### Common Module Registrations
|
|
22
|
-
|
|
23
|
-
| Component | Module Import | Registration |
|
|
24
|
-
|---|---|---|
|
|
25
|
-
| `IgrCategoryChart` | `IgrCategoryChartModule` | `IgrCategoryChartModule.register()` |
|
|
26
|
-
| `IgrDataChart` | `IgrDataChartCoreModule` + category/annotation modules (see [Complete Data Chart Example](#complete-data-chart-example)) | Multiple `.register()` calls required |
|
|
27
|
-
| `IgrPieChart` | `IgrPieChartModule` | `IgrPieChartModule.register()` |
|
|
28
|
-
| `IgrFinancialChart` | `IgrFinancialChartModule` | `IgrFinancialChartModule.register()` |
|
|
29
|
-
| `IgrRadialGauge` | `IgrRadialGaugeModule` | `IgrRadialGaugeModule.register()` |
|
|
30
|
-
| `IgrLinearGauge` | `IgrLinearGaugeModule` | `IgrLinearGaugeModule.register()` |
|
|
31
|
-
| `IgrGeographicMap` | `IgrGeographicMapModule` | `IgrGeographicMapModule.register()` |
|
|
32
|
-
| `IgrGridLite` | (no registration needed) | N/A — works like standard React component |
|
|
33
|
-
|
|
34
|
-
## Container Sizing (REQUIRED)
|
|
35
|
-
|
|
36
|
-
> **⚠️ CRITICAL:** Charts, gauges, maps, and Grid Lite **require an explicit-sized container** to render. They inherit their dimensions from the parent element — if the parent has no height/width, the component will not be visible. Always wrap these components in a container with explicit `min-width`, `min-height`, or `flex-grow` styling.
|
|
37
|
-
|
|
38
|
-
```css
|
|
39
|
-
/* Chart container CSS */
|
|
40
|
-
.chart-container {
|
|
41
|
-
min-width: 400px;
|
|
42
|
-
min-height: 300px;
|
|
43
|
-
flex-grow: 1;
|
|
44
|
-
flex-basis: 0;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/* Ensure the chart fills its container */
|
|
48
|
-
.chart-container > * {
|
|
49
|
-
height: 100%;
|
|
50
|
-
width: 100%;
|
|
51
|
-
}
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## Complete Chart Example
|
|
55
|
-
|
|
56
|
-
> Call `get_doc('react', 'column-chart')` for full `IgrCategoryChart` and `IgrDataChart` usage, prop tables, and code examples. Call `get_doc('react', 'chart-features')` for axes, annotations, animations, markers, and tooltips.
|
|
57
|
-
|
|
58
|
-
The minimum pattern — register the module at file scope, then wrap the component in a sized container:
|
|
59
|
-
|
|
60
|
-
```tsx
|
|
61
|
-
import { IgrCategoryChart, IgrCategoryChartModule } from 'igniteui-react-charts';
|
|
62
|
-
import styles from './dashboard-view.module.css';
|
|
63
|
-
|
|
64
|
-
// Register the chart module (required, called once at module level)
|
|
65
|
-
IgrCategoryChartModule.register();
|
|
66
|
-
|
|
67
|
-
export default function DashboardView() {
|
|
68
|
-
const salesData = [
|
|
69
|
-
{ month: 'Jan', revenue: 12500 },
|
|
70
|
-
{ month: 'Feb', revenue: 18200 },
|
|
71
|
-
{ month: 'Mar', revenue: 15800 },
|
|
72
|
-
];
|
|
73
|
-
|
|
74
|
-
return (
|
|
75
|
-
<div className={styles['chart-container']}>
|
|
76
|
-
<IgrCategoryChart
|
|
77
|
-
dataSource={salesData}
|
|
78
|
-
chartType="column"
|
|
79
|
-
xAxisTitle="Month"
|
|
80
|
-
yAxisTitle="Revenue ($)"
|
|
81
|
-
/>
|
|
82
|
-
</div>
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## Complete Data Chart Example
|
|
88
|
-
|
|
89
|
-
> **⚠️ IMPORTANT:** `IgrDataChart` requires registering **multiple modules** depending on the series type used. For bar charts, register the modules shown below. If you miss any module, the chart or axis types will silently fail to render.
|
|
90
|
-
|
|
91
|
-
### Module Registration for Bar Charts
|
|
92
|
-
|
|
93
|
-
```tsx
|
|
94
|
-
import {
|
|
95
|
-
IgrLegendModule,
|
|
96
|
-
IgrDataChartCoreModule,
|
|
97
|
-
IgrDataChartCategoryCoreModule,
|
|
98
|
-
IgrDataChartCategoryModule,
|
|
99
|
-
IgrDataChartInteractivityModule,
|
|
100
|
-
IgrDataChartVerticalCategoryModule,
|
|
101
|
-
IgrDataChartAnnotationModule,
|
|
102
|
-
} from 'igniteui-react-charts';
|
|
103
|
-
|
|
104
|
-
// Register all required modules once at module level (outside any component)
|
|
105
|
-
IgrLegendModule.register();
|
|
106
|
-
IgrDataChartCoreModule.register();
|
|
107
|
-
IgrDataChartCategoryCoreModule.register();
|
|
108
|
-
IgrDataChartCategoryModule.register();
|
|
109
|
-
IgrDataChartInteractivityModule.register();
|
|
110
|
-
IgrDataChartVerticalCategoryModule.register();
|
|
111
|
-
IgrDataChartAnnotationModule.register();
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
| Module | Purpose |
|
|
115
|
-
|---|---|
|
|
116
|
-
| `IgrDataChartCoreModule` | Core chart infrastructure |
|
|
117
|
-
| `IgrDataChartCategoryCoreModule` | Base for category series |
|
|
118
|
-
| `IgrDataChartCategoryModule` | Column, Line, Area, Spline etc. |
|
|
119
|
-
| `IgrDataChartVerticalCategoryModule` | **Bar series** (horizontal bars) |
|
|
120
|
-
| `IgrDataChartInteractivityModule` | Mouse hover, selection |
|
|
121
|
-
| `IgrDataChartAnnotationModule` | Tooltip layers, callout layers |
|
|
122
|
-
| `IgrLegendModule` | `IgrLegend` component |
|
|
123
|
-
|
|
124
|
-
### Axis Choice for Bar Charts
|
|
125
|
-
|
|
126
|
-
| Chart Orientation | Category Axis | Value Axis |
|
|
127
|
-
|---|---|---|
|
|
128
|
-
| Bar (horizontal) | `IgrCategoryYAxis` | `IgrNumericXAxis` |
|
|
129
|
-
| Column (vertical) | `IgrCategoryXAxis` | `IgrNumericYAxis` |
|
|
130
|
-
|
|
131
|
-
> **Bar charts are horizontal** — categories go on the Y-axis and numeric values on the X-axis. This is the opposite of column charts.
|
|
132
|
-
|
|
133
|
-
> For the full `IgrDataChart` API (all series types, axis options, layers), call `get_doc('react', 'bar-chart')` or `get_doc('react', 'column-chart')`.
|
|
134
|
-
|
|
135
|
-
### Complete Bar Chart Component (Multiple Series)
|
|
136
|
-
|
|
137
|
-
```tsx
|
|
138
|
-
import { useRef } from 'react';
|
|
139
|
-
import {
|
|
140
|
-
IgrLegendModule,
|
|
141
|
-
IgrDataChartCoreModule,
|
|
142
|
-
IgrDataChartCategoryCoreModule,
|
|
143
|
-
IgrDataChartCategoryModule,
|
|
144
|
-
IgrDataChartInteractivityModule,
|
|
145
|
-
IgrDataChartVerticalCategoryModule,
|
|
146
|
-
IgrDataChartAnnotationModule,
|
|
147
|
-
IgrLegend,
|
|
148
|
-
IgrDataChart,
|
|
149
|
-
IgrCategoryYAxis,
|
|
150
|
-
IgrNumericXAxis,
|
|
151
|
-
IgrCategoryHighlightLayer,
|
|
152
|
-
IgrBarSeries,
|
|
153
|
-
IgrDataToolTipLayer,
|
|
154
|
-
} from 'igniteui-react-charts';
|
|
155
|
-
import styles from './bar-chart-view.module.css';
|
|
156
|
-
|
|
157
|
-
// Register all required modules once at module level
|
|
158
|
-
IgrLegendModule.register();
|
|
159
|
-
IgrDataChartCoreModule.register();
|
|
160
|
-
IgrDataChartCategoryCoreModule.register();
|
|
161
|
-
IgrDataChartCategoryModule.register();
|
|
162
|
-
IgrDataChartInteractivityModule.register();
|
|
163
|
-
IgrDataChartVerticalCategoryModule.register();
|
|
164
|
-
IgrDataChartAnnotationModule.register();
|
|
165
|
-
|
|
166
|
-
interface MovieFranchise {
|
|
167
|
-
franchise: string;
|
|
168
|
-
totalRevenue: number; // total box office in billions USD
|
|
169
|
-
highestGrossing: number; // highest single film in billions USD
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
const movieData: MovieFranchise[] = [
|
|
173
|
-
{ franchise: 'Marvel Universe', totalRevenue: 22.55, highestGrossing: 2.80 },
|
|
174
|
-
{ franchise: 'Star Wars', totalRevenue: 10.32, highestGrossing: 2.07 },
|
|
175
|
-
{ franchise: 'Harry Potter', totalRevenue: 9.19, highestGrossing: 1.34 },
|
|
176
|
-
{ franchise: 'Avengers', totalRevenue: 7.76, highestGrossing: 2.80 },
|
|
177
|
-
{ franchise: 'Spider Man', totalRevenue: 7.22, highestGrossing: 1.28 },
|
|
178
|
-
{ franchise: 'James Bond', totalRevenue: 7.12, highestGrossing: 1.11 },
|
|
179
|
-
];
|
|
180
|
-
|
|
181
|
-
export default function BarChartView() {
|
|
182
|
-
const legendRef = useRef<IgrLegend>(null);
|
|
183
|
-
|
|
184
|
-
return (
|
|
185
|
-
<div className={styles['chart-wrapper']}>
|
|
186
|
-
<h3 className={styles['legend-title']}>Highest Grossing Movie Franchises</h3>
|
|
187
|
-
|
|
188
|
-
{/* Legend must be rendered before the chart so the ref is populated */}
|
|
189
|
-
<IgrLegend ref={legendRef} orientation="Horizontal" />
|
|
190
|
-
|
|
191
|
-
<div className={styles['chart-container']}>
|
|
192
|
-
<IgrDataChart legend={legendRef.current ?? undefined}>
|
|
193
|
-
{/*
|
|
194
|
-
* IgrCategoryYAxis — category axis for horizontal bar charts.
|
|
195
|
-
* - label: field name that supplies the axis labels.
|
|
196
|
-
* - dataSource: the data array (required on the axis for bar charts).
|
|
197
|
-
* - isInverted: renders top-to-bottom instead of bottom-to-top.
|
|
198
|
-
* - gap / overlap: control bar spacing (gap) and multi-series overlap.
|
|
199
|
-
*/}
|
|
200
|
-
<IgrCategoryYAxis
|
|
201
|
-
name="yAxis"
|
|
202
|
-
label="franchise"
|
|
203
|
-
dataSource={movieData}
|
|
204
|
-
isInverted={true}
|
|
205
|
-
gap={0.5}
|
|
206
|
-
overlap={-0.1}
|
|
207
|
-
useEnhancedIntervalManagement={true}
|
|
208
|
-
enhancedIntervalPreferMoreCategoryLabels={true}
|
|
209
|
-
/>
|
|
210
|
-
|
|
211
|
-
{/* IgrNumericXAxis — value axis; start at 0 per bar chart best practices */}
|
|
212
|
-
<IgrNumericXAxis
|
|
213
|
-
name="xAxis"
|
|
214
|
-
title="Billions of U.S. Dollars"
|
|
215
|
-
/>
|
|
216
|
-
|
|
217
|
-
{/* Highlight the hovered category row across all series */}
|
|
218
|
-
<IgrCategoryHighlightLayer name="categoryHighlight" />
|
|
219
|
-
|
|
220
|
-
{/* First series — total franchise revenue */}
|
|
221
|
-
<IgrBarSeries
|
|
222
|
-
name="totalRevenueSeries"
|
|
223
|
-
xAxisName="xAxis"
|
|
224
|
-
yAxisName="yAxis"
|
|
225
|
-
title="Total Revenue of Franchise"
|
|
226
|
-
valueMemberPath="totalRevenue"
|
|
227
|
-
dataSource={movieData}
|
|
228
|
-
showDefaultTooltip={true}
|
|
229
|
-
isTransitionInEnabled={true}
|
|
230
|
-
isHighlightingEnabled={true}
|
|
231
|
-
/>
|
|
232
|
-
|
|
233
|
-
{/* Second series — highest grossing single film */}
|
|
234
|
-
<IgrBarSeries
|
|
235
|
-
name="highestGrossingSeries"
|
|
236
|
-
xAxisName="xAxis"
|
|
237
|
-
yAxisName="yAxis"
|
|
238
|
-
title="Highest Grossing Movie in Series"
|
|
239
|
-
valueMemberPath="highestGrossing"
|
|
240
|
-
dataSource={movieData}
|
|
241
|
-
showDefaultTooltip={true}
|
|
242
|
-
isTransitionInEnabled={true}
|
|
243
|
-
isHighlightingEnabled={true}
|
|
244
|
-
/>
|
|
245
|
-
|
|
246
|
-
{/* Rich tooltip layer — shows all series values on hover */}
|
|
247
|
-
<IgrDataToolTipLayer name="tooltips" />
|
|
248
|
-
</IgrDataChart>
|
|
249
|
-
</div>
|
|
250
|
-
</div>
|
|
251
|
-
);
|
|
252
|
-
}
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
```css
|
|
256
|
-
/* bar-chart-view.module.css */
|
|
257
|
-
.chart-wrapper {
|
|
258
|
-
display: flex;
|
|
259
|
-
flex-direction: column;
|
|
260
|
-
min-width: 500px;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
.legend-title {
|
|
264
|
-
font-size: 1rem;
|
|
265
|
-
font-weight: 600;
|
|
266
|
-
text-align: center;
|
|
267
|
-
margin-bottom: 0.5rem;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.chart-container {
|
|
271
|
-
min-height: 400px;
|
|
272
|
-
flex-grow: 1;
|
|
273
|
-
flex-basis: 0;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
/* Make the chart fill its container */
|
|
277
|
-
.chart-container > * {
|
|
278
|
-
height: 100%;
|
|
279
|
-
width: 100%;
|
|
280
|
-
}
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
## Complete Grid Lite Example
|
|
284
|
-
|
|
285
|
-
> **⚠️ IMPORTANT:** Grid Lite (`IgrGridLite` from `igniteui-react/grid-lite`) requires installing both `igniteui-react` and `igniteui-grid-lite` packages. It's a React wrapper component (uses `Igr` prefix) and works like any standard React component — no `.register()` needed.
|
|
286
|
-
|
|
287
|
-
**Installation:**
|
|
288
|
-
```bash
|
|
289
|
-
npm install igniteui-react igniteui-grid-lite
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
**Usage:**
|
|
293
|
-
```tsx
|
|
294
|
-
import { IgrGridLite } from 'igniteui-react/grid-lite';
|
|
295
|
-
import { useGetCustomers } from '../hooks/northwind-hooks';
|
|
296
|
-
import styles from './master-view.module.css';
|
|
297
|
-
|
|
298
|
-
export default function MasterView() {
|
|
299
|
-
const { northwindCustomers } = useGetCustomers();
|
|
300
|
-
|
|
301
|
-
return (
|
|
302
|
-
<div className={styles['grid-lite']}>
|
|
303
|
-
<IgrGridLite data={northwindCustomers} autoGenerate={true} />
|
|
304
|
-
</div>
|
|
305
|
-
);
|
|
306
|
-
}
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
```css
|
|
310
|
-
/* master-view.module.css */
|
|
311
|
-
.grid-lite {
|
|
312
|
-
min-width: 400px;
|
|
313
|
-
height: 600px;
|
|
314
|
-
flex-grow: 1;
|
|
315
|
-
flex-basis: 0;
|
|
316
|
-
}
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
## Grid Lite Example with Column Configurations and Templates
|
|
320
|
-
|
|
321
|
-
Use `IgrGridLiteColumn` to define columns explicitly with typed `dataType` and optional `cellTemplate` for custom rendering. Set `autoGenerate={false}` (or omit it) when providing explicit columns.
|
|
322
|
-
|
|
323
|
-
```tsx
|
|
324
|
-
import { IgrGridLite, IgrGridLiteColumn, type IgrCellContext } from 'igniteui-react/grid-lite';
|
|
325
|
-
import styles from './order-list.module.css';
|
|
326
|
-
|
|
327
|
-
interface Order {
|
|
328
|
-
id: number;
|
|
329
|
-
customer: string;
|
|
330
|
-
total: number;
|
|
331
|
-
date: Date;
|
|
332
|
-
status: 'pending' | 'shipped' | 'delivered';
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
const orders: Order[] = [
|
|
336
|
-
{ id: 1, customer: 'Alice', total: 149.99, date: new Date('2024-03-01'), status: 'delivered' },
|
|
337
|
-
{ id: 2, customer: 'Bob', total: 89.50, date: new Date('2024-03-10'), status: 'shipped' },
|
|
338
|
-
{ id: 3, customer: 'Carol', total: 220.00, date: new Date('2024-03-15'), status: 'pending' },
|
|
339
|
-
];
|
|
340
|
-
|
|
341
|
-
// Simple cell templates — render JSX based on the cell value or row data
|
|
342
|
-
const currencyTemplate = (ctx: IgrCellContext<Order>) => (
|
|
343
|
-
<span>${(ctx.value as number).toFixed(2)}</span>
|
|
344
|
-
);
|
|
345
|
-
|
|
346
|
-
const dateTemplate = (ctx: IgrCellContext<Order>) => (
|
|
347
|
-
<span>{(ctx.value as Date).toLocaleDateString()}</span>
|
|
348
|
-
);
|
|
349
|
-
|
|
350
|
-
const statusTemplate = (ctx: IgrCellContext<Order>) => {
|
|
351
|
-
const colors: Record<Order['status'], string> = {
|
|
352
|
-
pending: 'orange',
|
|
353
|
-
shipped: 'blue',
|
|
354
|
-
delivered: 'green',
|
|
355
|
-
};
|
|
356
|
-
return <span style={{ color: colors[ctx.value as Order['status']] }}>{ctx.value}</span>;
|
|
357
|
-
};
|
|
358
|
-
|
|
359
|
-
export default function OrderList() {
|
|
360
|
-
return (
|
|
361
|
-
<div className={styles['grid-lite']}>
|
|
362
|
-
<IgrGridLite data={orders}>
|
|
363
|
-
{/* dataType ensures correct sorting and filtering behavior */}
|
|
364
|
-
<IgrGridLiteColumn field="id" dataType="number" />
|
|
365
|
-
<IgrGridLiteColumn field="customer" dataType="string" />
|
|
366
|
-
{/* Columns with custom cell templates */}
|
|
367
|
-
<IgrGridLiteColumn field="date" cellTemplate={dateTemplate} />
|
|
368
|
-
<IgrGridLiteColumn field="total" dataType="number" cellTemplate={currencyTemplate} />
|
|
369
|
-
<IgrGridLiteColumn field="status" dataType="string" cellTemplate={statusTemplate} />
|
|
370
|
-
</IgrGridLite>
|
|
371
|
-
</div>
|
|
372
|
-
);
|
|
373
|
-
}
|
|
374
|
-
```
|
|
375
|
-
|
|
376
|
-
```css
|
|
377
|
-
/* order-list.module.css */
|
|
378
|
-
.grid-lite {
|
|
379
|
-
min-width: 400px;
|
|
380
|
-
height: 600px;
|
|
381
|
-
flex-grow: 1;
|
|
382
|
-
flex-basis: 0;
|
|
383
|
-
}
|
|
384
|
-
```
|
|
385
|
-
|
|
386
|
-
## Column Width Rule (Grid Lite and Advanced Grids)
|
|
387
|
-
|
|
388
|
-
> **⚠️ Do NOT set `width` on columns unless the user explicitly asks for specific column widths.**
|
|
389
|
-
>
|
|
390
|
-
> - `IgrGridLiteColumn` defaults to `minmax(136px, 1fr)` — columns are already responsive and fill all available space.
|
|
391
|
-
> - `IgrColumn` (in `IgrGrid`, `IgrTreeGrid`, `IgrHierarchicalGrid`) also auto-sizes by default.
|
|
392
|
-
> - Adding explicit pixel widths causes a fixed layout that leaves empty space on the right side of the grid.
|
|
393
|
-
> - If widths are set on some columns, leave at least one column without a `width` so it expands to fill the remaining space.
|
|
394
|
-
|
|
395
|
-
> **Column configuration notes:**
|
|
396
|
-
> - `dataType` accepts `"string"` (default), `"number"`, `"boolean"` — set it explicitly so sorting and filtering work correctly for each column type.
|
|
397
|
-
> - `cellTemplate` receives an `IgrCellContext<T>` where `ctx.value` is the cell value and `ctx.row.data` is the full row object.
|
|
398
|
-
> - When using `cellTemplate`, define the function outside the component (or memoize it) to avoid unnecessary re-renders.
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
# Component Catalogue
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
This reference gives high-level guidance on Ignite UI for React components, their key features, and common use cases. For a full list of components, call `list_components` from `igniteui-cli` with the specific chart, or grid component, or feature you're interested in.
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Step-by-Step: Choosing Components for a UI
|
|
9
|
-
|
|
10
|
-
Follow these steps when a user describes a UI requirement:
|
|
11
|
-
|
|
12
|
-
### Step 1 — Identify UI patterns
|
|
13
|
-
|
|
14
|
-
Break the described UI into atomic patterns. Examples:
|
|
15
|
-
- "A booking form" → date input, text inputs, button, maybe a calendar picker
|
|
16
|
-
- "An admin dashboard" → navbar, nav drawer, cards, data grid, charts
|
|
17
|
-
- "A notification center" → snackbar or toast, badge, list
|
|
18
|
-
- "A settings page" → tabs or accordion, switch, input, select, button
|
|
19
|
-
|
|
20
|
-
### Step 2 — Map patterns to components
|
|
21
|
-
|
|
22
|
-
Call `list_components('react')` to discover available components, optionally filtered by keyword (e.g., `filter: 'date'` for date-related components). When in doubt:
|
|
23
|
-
|
|
24
|
-
| If the user needs… | Prefer… | Over… |
|
|
25
|
-
|---|---|---|
|
|
26
|
-
| Simple static list | `IgrList` | Data Grid |
|
|
27
|
-
| Basic dropdown | `IgrSelect` | `IgrCombo` |
|
|
28
|
-
| Searchable or multi-select dropdown | `IgrCombo` | `IgrSelect` |
|
|
29
|
-
| Tabular data with basic display | `IgrGridLite` (grid-lite) | `IgrGrid` (commercial) |
|
|
30
|
-
| Tabular data, advanced features needed | `IgrGrid` | `IgrGridLite` (grid-lite) |
|
|
31
|
-
| Single dismissible message | `IgrToast` | `IgrSnackbar` |
|
|
32
|
-
| Message requiring user action | `IgrSnackbar` | `IgrToast` |
|
|
33
|
-
| Collapsible single section | `IgrExpansionPanel` | `IgrAccordion` |
|
|
34
|
-
| Multiple collapsible sections | `IgrAccordion` | `IgrExpansionPanel` |
|
|
35
|
-
| Stepped wizard UI | `IgrStepper` | `IgrTabs` |
|
|
36
|
-
| Content tabs / view switching (inline content) | `IgrTabs` (content in `IgrTab`) | `IgrStepper` |
|
|
37
|
-
| Tab-based navigation (with React Router) | `IgrTabs` (label-only) | `IgrTabs` (with content) |
|
|
38
|
-
|
|
39
|
-
### Step 3 — Check the package
|
|
40
|
-
|
|
41
|
-
Confirm which package provides the component:
|
|
42
|
-
|
|
43
|
-
- **MIT components** (inputs, layout, notifications, scheduling, chat) → `igniteui-react`
|
|
44
|
-
- **Lightweight grid** (Grid Lite) → `igniteui-react/grid-lite` *(MIT, requires both `igniteui-react` and `igniteui-grid-lite` packages)*
|
|
45
|
-
- **Advanced grids** (Data Grid, Tree Grid, Hierarchical Grid, Pivot Grid) → `igniteui-react-grids` *(commercial)*
|
|
46
|
-
- **Charts** → `igniteui-react-charts` *(commercial)*
|
|
47
|
-
- **Maps** → `igniteui-react-maps` *(commercial)*
|
|
48
|
-
- **Gauges** → `igniteui-react-gauges` *(commercial)*
|
|
49
|
-
|
|
50
|
-
### Step 4 — Look up component documentation
|
|
51
|
-
|
|
52
|
-
Call `get_doc('react', '<name>')` with the doc name from `list_components` results to get full usage documentation, import paths, prop tables, event signatures, and code examples. Use `search_docs('<query>', 'react')` for feature-based questions (e.g., `"date picker range selection"`).
|
|
53
|
-
|
|
54
|
-
### Step 5 — Provide a starter code snippet
|
|
55
|
-
|
|
56
|
-
Once components are identified, give the user a minimal working React snippet. Example for an admin dashboard shell:
|
|
57
|
-
|
|
58
|
-
```tsx
|
|
59
|
-
import { IgrNavbar, IgrNavDrawer, IgrNavDrawerItem, IgrCard, IgrCardHeader, IgrCardContent } from 'igniteui-react';
|
|
60
|
-
import 'igniteui-webcomponents/themes/light/bootstrap.css';
|
|
61
|
-
|
|
62
|
-
function Dashboard() {
|
|
63
|
-
return (
|
|
64
|
-
<>
|
|
65
|
-
<IgrNavbar>
|
|
66
|
-
<h1>My Dashboard</h1>
|
|
67
|
-
</IgrNavbar>
|
|
68
|
-
|
|
69
|
-
<IgrNavDrawer open>
|
|
70
|
-
<IgrNavDrawerItem>
|
|
71
|
-
<span slot="icon">🏠</span>
|
|
72
|
-
<span slot="content">Home</span>
|
|
73
|
-
</IgrNavDrawerItem>
|
|
74
|
-
<IgrNavDrawerItem>
|
|
75
|
-
<span slot="icon">⚙️</span>
|
|
76
|
-
<span slot="content">Settings</span>
|
|
77
|
-
</IgrNavDrawerItem>
|
|
78
|
-
</IgrNavDrawer>
|
|
79
|
-
|
|
80
|
-
<main>
|
|
81
|
-
<IgrCard>
|
|
82
|
-
<IgrCardHeader>
|
|
83
|
-
<h3 slot="title">Summary</h3>
|
|
84
|
-
</IgrCardHeader>
|
|
85
|
-
<IgrCardContent>Dashboard content here</IgrCardContent>
|
|
86
|
-
</IgrCard>
|
|
87
|
-
</main>
|
|
88
|
-
</>
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## Common UI Scenarios → Recommended Component Sets
|
|
96
|
-
|
|
97
|
-
### Login / Authentication Form
|
|
98
|
-
|
|
99
|
-
- `IgrInput` — email and password fields
|
|
100
|
-
- `IgrCheckbox` — "Remember me"
|
|
101
|
-
- `IgrButton` — submit
|
|
102
|
-
- `IgrSnackbar` — error/success feedback
|
|
103
|
-
|
|
104
|
-
### User Profile / Settings Page
|
|
105
|
-
|
|
106
|
-
- `IgrAvatar` — profile picture
|
|
107
|
-
- `IgrTabs` — section navigation (Profile, Security, Notifications)
|
|
108
|
-
- `IgrInput` / `IgrTextarea` — editable fields
|
|
109
|
-
- `IgrSwitch` — feature toggles
|
|
110
|
-
- `IgrSelect` — preference dropdowns
|
|
111
|
-
- `IgrButton` — save/cancel actions
|
|
112
|
-
|
|
113
|
-
### Data Table / Admin List View
|
|
114
|
-
|
|
115
|
-
- `IgrInput` — search bar
|
|
116
|
-
- `IgrCombo` — filter dropdowns
|
|
117
|
-
- `IgrGridLite` (grid-lite) or `IgrGrid` — tabular data
|
|
118
|
-
- `IgrButton` / `IgrIconButton` — actions
|
|
119
|
-
- `IgrDialog` — confirm delete modal
|
|
120
|
-
- `IgrBadge` — status indicators
|
|
121
|
-
|
|
122
|
-
### Booking / Reservation Form
|
|
123
|
-
|
|
124
|
-
- `IgrDateRangePicker` — check-in / check-out
|
|
125
|
-
- `IgrInput` — guest details
|
|
126
|
-
- `IgrSelect` — room type
|
|
127
|
-
- `IgrStepper` — multi-step booking flow
|
|
128
|
-
- `IgrButton` — next / confirm
|
|
129
|
-
- `IgrToast` — booking confirmation
|
|
130
|
-
|
|
131
|
-
### Analytics / Reporting Dashboard
|
|
132
|
-
|
|
133
|
-
- `IgrNavbar` — top bar
|
|
134
|
-
- `IgrNavDrawer` — side navigation
|
|
135
|
-
- `IgrCard` — KPI summary cards
|
|
136
|
-
- `IgrTabs` or `IgrTileManager` — section layout
|
|
137
|
-
- `IgrGrid` or `IgrPivotGrid` — detailed data tables
|
|
138
|
-
- `IgrCategoryChart` — charts (from `igniteui-react-charts`)
|
|
139
|
-
- `IgrLinearProgress` / `IgrCircularProgress` — loading indicators
|
|
140
|
-
|
|
141
|
-
### Master-Detail with Tab Navigation (React Router)
|
|
142
|
-
|
|
143
|
-
- `IgrNavbar` — top bar
|
|
144
|
-
- `IgrTabs` — **navigation only** (label-only, no inline content); each `IgrTab` triggers a route change
|
|
145
|
-
- React Router `<Outlet />` — renders the routed child view below the tabs
|
|
146
|
-
- Active tab synced to the current route via `selected` prop
|
|
147
|
-
|
|
148
|
-
> **⚠️ Important — Tabs for navigation vs. tabs for content:**
|
|
149
|
-
> - **Tabs as content panels** (`IgrTabs` with content in `IgrTab`): Content is rendered inside each tab. Use when the tab content is inline and does not require routing.
|
|
150
|
-
> - **Tabs as navigation** (`IgrTabs` with label-only tabs): Tabs act as route links. The routing outlet (`<Outlet />`) renders the content. **Do NOT add inline content in `IgrTab` in this case** — use only the `label` prop or `slot="label"`. See [JSX-PATTERNS.md](./JSX-PATTERNS.md) for a full React Router example.
|
|
151
|
-
|
|
152
|
-
---
|
|
153
|
-
|
|
154
|
-
## Searching the Documentation
|
|
155
|
-
|
|
156
|
-
Use MCP tools for up-to-date component discovery and API lookup:
|
|
157
|
-
|
|
158
|
-
- `list_components('react')` — browse the full component catalogue, optionally narrowed with a filter keyword
|
|
159
|
-
- `get_doc('react', '<name>')` — full documentation, prop tables, and code examples for a component
|
|
160
|
-
- `search_docs('<query>', 'react')` — full-text search for features or behaviors (e.g., `"date picker range selection"`)
|
|
161
|
-
- `search_api('<query>', 'react')` — look up specific classes, properties, or methods
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
# Event Handling
|
|
2
|
-
|
|
3
|
-
## How Events Work
|
|
4
|
-
|
|
5
|
-
Ignite UI React wrappers map web component custom events to React-style `onXxx` callback props. The event name is converted from the web component event name to a camelCase `on`-prefixed prop.
|
|
6
|
-
|
|
7
|
-
```tsx
|
|
8
|
-
import { IgrButton, IgrInput, IgrCheckbox } from 'igniteui-react';
|
|
9
|
-
|
|
10
|
-
function MyForm() {
|
|
11
|
-
const handleClick = (event: CustomEvent) => {
|
|
12
|
-
console.log('Button clicked');
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const handleInput = (event: CustomEvent) => {
|
|
16
|
-
// event.target is the underlying web component element (e.g., igc-input)
|
|
17
|
-
console.log('Input value:', (event.target as any).value);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const handleChange = (event: CustomEvent) => {
|
|
21
|
-
console.log('Checkbox changed:', event.detail);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<>
|
|
26
|
-
<IgrButton onClick={handleClick}>
|
|
27
|
-
<span>Submit</span>
|
|
28
|
-
</IgrButton>
|
|
29
|
-
<IgrInput label="Name" onInput={handleInput} />
|
|
30
|
-
<IgrCheckbox onChange={handleChange}>Accept terms</IgrCheckbox>
|
|
31
|
-
</>
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Common Event Props
|
|
37
|
-
|
|
38
|
-
> For component-specific event signatures and detail types, call `get_api_reference('react', '<Component>', 'events')` — e.g. `get_api_reference('react', 'IgrCombo', 'events')`.
|
|
39
|
-
|
|
40
|
-
| Component | Event Prop | Fires When |
|
|
41
|
-
|---|---|---|
|
|
42
|
-
| `IgrButton` | `onClick` | Button is clicked |
|
|
43
|
-
| `IgrInput` | `onInput` | Value changes (each keystroke) |
|
|
44
|
-
| `IgrInput` | `onChange` | Value committed (blur / Enter) |
|
|
45
|
-
| `IgrCheckbox` | `onChange` | Checked state changes |
|
|
46
|
-
| `IgrSwitch` | `onChange` | Toggle state changes |
|
|
47
|
-
| `IgrSelect` | `onChange` | Selection changes |
|
|
48
|
-
| `IgrCombo` | `onChange` | Selection changes |
|
|
49
|
-
| `IgrSlider` | `onInput` | Slider value changes (live) |
|
|
50
|
-
| `IgrSlider` | `onChange` | Slider value committed |
|
|
51
|
-
| `IgrDialog` | `onClosing` | Dialog is about to close |
|
|
52
|
-
| `IgrDialog` | `onClosed` | Dialog has closed |
|
|
53
|
-
| `IgrTabs` | `onChange` | Active tab changes |
|
|
54
|
-
| `IgrCalendar` | `onChange` | Selected date changes |
|
|
55
|
-
| `IgrDatePicker` | `onChange` | Selected date changes |
|
|
56
|
-
|
|
57
|
-
## TypeScript Event Types
|
|
58
|
-
|
|
59
|
-
When using TypeScript, event handlers receive the underlying `CustomEvent`:
|
|
60
|
-
|
|
61
|
-
```tsx
|
|
62
|
-
import { IgrInput } from 'igniteui-react';
|
|
63
|
-
|
|
64
|
-
function SearchBar() {
|
|
65
|
-
const handleInput = (e: CustomEvent) => {
|
|
66
|
-
const value = (e.target as HTMLInputElement).value;
|
|
67
|
-
console.log('Search:', value);
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
return <IgrInput label="Search" onInput={handleInput} />;
|
|
71
|
-
}
|
|
72
|
-
```
|