Skip to content

Commit d402ff6

Browse files
azure-pipelines[bot]tfsbuild
andauthored
Adding changes from build igniteui-xplat-examples-output+PRs_2026.5.27.1 (#1075)
Co-authored-by: tfsbuild <tfsbuild@infragistics.com>
1 parent df14cd9 commit d402ff6

10 files changed

Lines changed: 359 additions & 0 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "Node.js",
3+
"image": "mcr.microsoft.com/devcontainers/javascript-node:22"
4+
}
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
// https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project
2+
module.exports = {
3+
parser: "@typescript-eslint/parser", // Specifies the ESLint parser
4+
parserOptions: {
5+
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
6+
sourceType: "module", // Allows for the use of imports
7+
ecmaFeatures: {
8+
jsx: true // Allows for the parsing of JSX
9+
}
10+
},
11+
settings: {
12+
react: {
13+
version: "999.999.999" // Tells eslint-plugin-react to automatically detect the version of React to use
14+
}
15+
},
16+
extends: [
17+
"eslint:recommended",
18+
"plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react
19+
"plugin:@typescript-eslint/recommended" // Uses the recommended rules from @typescript-eslint/eslint-plugin
20+
],
21+
rules: {
22+
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
23+
"default-case": "off",
24+
"jsx-a11y/alt-text": "off",
25+
"jsx-a11y/iframe-has-title": "off",
26+
"no-undef": "off",
27+
"no-unused-vars": "off",
28+
"no-extend-native": "off",
29+
"no-throw-literal": "off",
30+
"no-useless-concat": "off",
31+
"no-mixed-operators": "off",
32+
"no-prototype-builtins": "off",
33+
"no-mixed-spaces-and-tabs": 0,
34+
"prefer-const": "off",
35+
"prefer-rest-params": "off",
36+
"@typescript-eslint/no-unused-vars": "off",
37+
"@typescript-eslint/no-explicit-any": "off",
38+
"@typescript-eslint/no-inferrable-types": "off",
39+
"@typescript-eslint/no-useless-constructor": "off",
40+
"@typescript-eslint/no-use-before-define": "off",
41+
"@typescript-eslint/no-non-null-assertion": "off",
42+
"@typescript-eslint/interface-name-prefix": "off",
43+
"@typescript-eslint/prefer-namespace-keyword": "off",
44+
"@typescript-eslint/explicit-function-return-type": "off",
45+
"@typescript-eslint/explicit-module-boundary-types": "off"
46+
},
47+
"overrides": [
48+
{
49+
"files": ["*.ts", "*.tsx"],
50+
"rules": {
51+
"default-case": "off",
52+
"jsx-a11y/alt-text": "off",
53+
"jsx-a11y/iframe-has-title": "off",
54+
"no-var": "off",
55+
"no-undef": "off",
56+
"no-unused-vars": "off",
57+
"no-extend-native": "off",
58+
"no-throw-literal": "off",
59+
"no-useless-concat": "off",
60+
"no-mixed-operators": "off",
61+
"no-mixed-spaces-and-tabs": 0,
62+
"no-prototype-builtins": "off",
63+
"prefer-const": "off",
64+
"prefer-rest-params": "off",
65+
"@typescript-eslint/no-unused-vars": "off",
66+
"@typescript-eslint/no-explicit-any": "off",
67+
"@typescript-eslint/no-inferrable-types": "off",
68+
"@typescript-eslint/no-useless-constructor": "off",
69+
"@typescript-eslint/no-use-before-define": "off",
70+
"@typescript-eslint/no-non-null-assertion": "off",
71+
"@typescript-eslint/interface-name-prefix": "off",
72+
"@typescript-eslint/prefer-namespace-keyword": "off",
73+
"@typescript-eslint/explicit-function-return-type": "off",
74+
"@typescript-eslint/explicit-module-boundary-types": "off"
75+
}
76+
}
77+
]
78+
};
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>Sample | Ignite UI | React | infragistics</title>
5+
<link rel="shortcut icon" href="https://dl.infragistics.com/x/img/browsers/react.png" >
6+
<link rel="stylesheet" href="https://dl.infragistics.com/x/css/samples/shared.v8.css" />
7+
</head>
8+
<body>
9+
<div id="root"></div>
10+
<script type="module" src="/src/index.tsx"></script>
11+
</body>
12+
</html>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"name": "example-ignite-ui-react",
3+
"description": "This project provides example of using Ignite UI for React components",
4+
"author": "Infragistics",
5+
"version": "1.4.0",
6+
"license": "",
7+
"homepage": ".",
8+
"private": true,
9+
"scripts": {
10+
"start": "vite --port 4200",
11+
"build": "tsc && node --max-old-space-size=4096 node_modules/vite/bin/vite build",
12+
"preview": "vite preview",
13+
"test": "vitest",
14+
"lint": "eslint ./src/**/*.{ts,tsx}"
15+
},
16+
"dependencies": {
17+
"igniteui-react": "^19.6.2",
18+
"igniteui-react-charts": "19.6.0-beta.2",
19+
"igniteui-react-core": "19.6.0-beta.2",
20+
"igniteui-webcomponents": "^7.0.0",
21+
"lit-html": "^3.2.0",
22+
"react": "^19.2.0",
23+
"react-dom": "^19.2.0",
24+
"tslib": "^2.4.0"
25+
},
26+
"devDependencies": {
27+
"@types/jest": "^29.2.0",
28+
"@types/node": "^24.7.1",
29+
"@types/react": "^18.0.24",
30+
"@types/react-dom": "^18.0.8",
31+
"@vitejs/plugin-react": "^5.0.4",
32+
"@vitest/browser": "^3.2.4",
33+
"eslint": "^8.33.0",
34+
"eslint-config-react": "^1.1.7",
35+
"eslint-plugin-react": "^7.20.0",
36+
"typescript": "^4.8.4",
37+
"vite": "^7.1.9",
38+
"vitest": "^3.2.4",
39+
"vitest-canvas-mock": "^0.3.3",
40+
"worker-loader": "^3.0.8"
41+
},
42+
"browserslist": [
43+
">0.2%",
44+
"not dead",
45+
"not ie <= 11",
46+
"not op_mini all"
47+
]
48+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"infiniteLoopProtection": false,
3+
"hardReloadOnChange": false,
4+
"view": "browser"
5+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
export class TemperatureRangeDataItem {
2+
public constructor(init: Partial<TemperatureRangeDataItem>) {
3+
Object.assign(this, init);
4+
}
5+
6+
public month: string;
7+
public highNY: number;
8+
public lowNY: number;
9+
public highLA: number;
10+
public lowLA: number;
11+
12+
}
13+
export class TemperatureRangeData extends Array<TemperatureRangeDataItem> {
14+
public constructor(items: Array<TemperatureRangeDataItem> | number = -1) {
15+
if (Array.isArray(items)) {
16+
super(...items);
17+
} else {
18+
const newItems = [
19+
new TemperatureRangeDataItem({ month: `Jan`, highNY: 10.6, lowNY: -6.6, highLA: 28.3, lowLA: 7.8 }),
20+
new TemperatureRangeDataItem({ month: `Feb`, highNY: 7.8, lowNY: -9.9, highLA: 31.1, lowLA: 5.6 }),
21+
new TemperatureRangeDataItem({ month: `Mar`, highNY: 12.2, lowNY: -3.8, highLA: 27.8, lowLA: 8.3 }),
22+
new TemperatureRangeDataItem({ month: `Apr`, highNY: 11.7, lowNY: 2.2, highLA: 33.9, lowLA: 10.6 }),
23+
new TemperatureRangeDataItem({ month: `May`, highNY: 19.4, lowNY: 1.1, highLA: 35, lowLA: 13.9 }),
24+
new TemperatureRangeDataItem({ month: `Jun`, highNY: 23.3, lowNY: 10.6, highLA: 36.7, lowLA: 16.1 }),
25+
new TemperatureRangeDataItem({ month: `Jul`, highNY: 27.2, lowNY: 19.4, highLA: 33.3, lowLA: 15.6 }),
26+
new TemperatureRangeDataItem({ month: `Aug`, highNY: 25.6, lowNY: 16.7, highLA: 36.7, lowLA: 15.6 }),
27+
new TemperatureRangeDataItem({ month: `Sep`, highNY: 22.8, lowNY: 8.9, highLA: 43.9, lowLA: 16.1 }),
28+
new TemperatureRangeDataItem({ month: `Oct`, highNY: 17.8, lowNY: 0, highLA: 38.3, lowLA: 11.1 }),
29+
new TemperatureRangeDataItem({ month: `Nov`, highNY: 17.8, lowNY: -1, highLA: 32.8, lowLA: 6.7 }),
30+
new TemperatureRangeDataItem({ month: `Dec`, highNY: 8.3, lowNY: -6.6, highLA: 28.9, lowLA: 5.6 }),
31+
];
32+
super(...newItems.slice(0));
33+
}
34+
}
35+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/* shared styles are loaded from: */
2+
/* https://dl.infragistics.com/x/css/samples/shared.v8.css */
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
import React from 'react';
2+
import ReactDOM from 'react-dom/client';
3+
import './index.css';
4+
5+
import { IgrDataChartAnnotationModule, IgrDataChartCategoryModule, IgrDataChartCoreModule, IgrDataChartInteractivityModule, IgrDataChartVerticalCategoryModule, IgrLegendModule, IgrRangeBarSeriesModule } from 'igniteui-react-charts';
6+
import { IgrLegend, IgrDataChart, IgrCategoryYAxis, IgrNumericXAxis, IgrRangeBarSeries, IgrDataToolTipLayer } from 'igniteui-react-charts';
7+
import { TemperatureRangeDataItem, TemperatureRangeData } from './TemperatureRangeData';
8+
9+
const mods: any[] = [
10+
IgrDataChartAnnotationModule,
11+
IgrDataChartCategoryModule,
12+
IgrDataChartCoreModule,
13+
IgrDataChartInteractivityModule,
14+
IgrDataChartVerticalCategoryModule,
15+
IgrLegendModule,
16+
IgrRangeBarSeriesModule
17+
];
18+
mods.forEach((m) => m.register());
19+
20+
export default class Sample extends React.Component<any, any> {
21+
private legend: IgrLegend
22+
private legendRef(r: IgrLegend) {
23+
this.legend = r;
24+
this.setState({});
25+
}
26+
private chart: IgrDataChart
27+
private chartRef(r: IgrDataChart) {
28+
this.chart = r;
29+
this.setState({});
30+
}
31+
private yAxis: IgrCategoryYAxis
32+
private xAxis: IgrNumericXAxis
33+
private rangeBarSeries1: IgrRangeBarSeries
34+
private rangeBarSeries2: IgrRangeBarSeries
35+
private dataToolTipLayer: IgrDataToolTipLayer
36+
37+
constructor(props: any) {
38+
super(props);
39+
40+
this.legendRef = this.legendRef.bind(this);
41+
this.chartRef = this.chartRef.bind(this);
42+
}
43+
44+
public render(): JSX.Element {
45+
return (
46+
<div className="container sample">
47+
48+
<div className="legend-title">
49+
Monthly Temperature Range in LA and NYC
50+
</div>
51+
52+
<div className="legend">
53+
<IgrLegend
54+
ref={this.legendRef}
55+
orientation="Horizontal">
56+
</IgrLegend>
57+
</div>
58+
59+
<div className="container fill">
60+
<IgrDataChart
61+
ref={this.chartRef}
62+
isHorizontalZoomEnabled="false"
63+
isVerticalZoomEnabled="false"
64+
legend={this.legend}>
65+
<IgrCategoryYAxis
66+
name="yAxis"
67+
label="month"
68+
interval="1"
69+
dataSource={this.temperatureRangeData}>
70+
</IgrCategoryYAxis>
71+
<IgrNumericXAxis
72+
name="xAxis"
73+
title="Temperature (in Celsius)"
74+
titleAngle="0"
75+
titleTopMargin="10">
76+
</IgrNumericXAxis>
77+
<IgrRangeBarSeries
78+
name="RangeBarSeries1"
79+
xAxisName="xAxis"
80+
yAxisName="yAxis"
81+
title="Los Angeles"
82+
lowMemberPath="lowLA"
83+
highMemberPath="highLA"
84+
showDefaultTooltip="false"
85+
dataSource={this.temperatureRangeData}>
86+
</IgrRangeBarSeries>
87+
<IgrRangeBarSeries
88+
name="RangeBarSeries2"
89+
xAxisName="xAxis"
90+
yAxisName="yAxis"
91+
title="New York"
92+
lowMemberPath="lowNY"
93+
highMemberPath="highNY"
94+
showDefaultTooltip="false"
95+
dataSource={this.temperatureRangeData}>
96+
</IgrRangeBarSeries>
97+
<IgrDataToolTipLayer
98+
name="dataToolTipLayer">
99+
</IgrDataToolTipLayer>
100+
</IgrDataChart>
101+
</div>
102+
</div>
103+
);
104+
}
105+
106+
private _temperatureRangeData: TemperatureRangeData = null;
107+
public get temperatureRangeData(): TemperatureRangeData {
108+
if (this._temperatureRangeData == null)
109+
{
110+
this._temperatureRangeData = new TemperatureRangeData();
111+
}
112+
return this._temperatureRangeData;
113+
}
114+
115+
}
116+
117+
// rendering above component in the React DOM
118+
const root = ReactDOM.createRoot(document.getElementById('root'));
119+
root.render(<Sample/>);
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"compilerOptions": {
3+
"resolveJsonModule": true,
4+
"esModuleInterop": true,
5+
"baseUrl": ".",
6+
"outDir": "build/dist",
7+
"module": "esnext",
8+
"target": "es5",
9+
"lib": [
10+
"es6",
11+
"dom"
12+
],
13+
"sourceMap": true,
14+
"allowJs": true,
15+
"jsx": "react-jsx",
16+
"moduleResolution": "node",
17+
"rootDir": "src",
18+
"forceConsistentCasingInFileNames": true,
19+
"noImplicitReturns": true,
20+
"noImplicitThis": true,
21+
"noImplicitAny": true,
22+
"noUnusedLocals": false,
23+
"importHelpers": true,
24+
"allowSyntheticDefaultImports": true,
25+
"skipLibCheck": true,
26+
"strict": false,
27+
"isolatedModules": true,
28+
"noEmit": true
29+
},
30+
"exclude": [
31+
"node_modules",
32+
"build",
33+
"scripts",
34+
"acceptance-tests",
35+
"webpack",
36+
"jest",
37+
"src/setupTests.ts",
38+
"**/odatajs-4.0.0.js",
39+
"config-overrides.js"
40+
],
41+
"include": [
42+
"src"
43+
]
44+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { defineConfig } from 'vite';
2+
import react from '@vitejs/plugin-react';
3+
4+
export default defineConfig({
5+
plugins: [react()],
6+
build: {
7+
outDir: 'build'
8+
},
9+
server: {
10+
open: false
11+
},
12+
});

0 commit comments

Comments
 (0)