Skip to content

Commit 88f6a07

Browse files
azure-pipelines[bot]tfsbuild
andauthored
Adding changes from build igniteui-xplat-examples-output+PRs_2024.6.21.1 (#594)
Co-authored-by: tfsbuild <tfsbuild@infragistics.com>
1 parent 0ff84cd commit 88f6a07

27 files changed

Lines changed: 1099 additions & 0 deletions
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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+
"prefer-const": "off",
34+
"prefer-rest-params": "off",
35+
"@typescript-eslint/no-unused-vars": "off",
36+
"@typescript-eslint/no-explicit-any": "off",
37+
"@typescript-eslint/no-inferrable-types": "off",
38+
"@typescript-eslint/no-useless-constructor": "off",
39+
"@typescript-eslint/no-use-before-define": "off",
40+
"@typescript-eslint/no-non-null-assertion": "off",
41+
"@typescript-eslint/interface-name-prefix": "off",
42+
"@typescript-eslint/prefer-namespace-keyword": "off",
43+
"@typescript-eslint/explicit-function-return-type": "off",
44+
"@typescript-eslint/explicit-module-boundary-types": "off"
45+
},
46+
"overrides": [
47+
{
48+
"files": ["*.ts", "*.tsx"],
49+
"rules": {
50+
"default-case": "off",
51+
"jsx-a11y/alt-text": "off",
52+
"jsx-a11y/iframe-has-title": "off",
53+
"no-var": "off",
54+
"no-undef": "off",
55+
"no-unused-vars": "off",
56+
"no-extend-native": "off",
57+
"no-throw-literal": "off",
58+
"no-useless-concat": "off",
59+
"no-mixed-operators": "off",
60+
"no-prototype-builtins": "off",
61+
"prefer-const": "off",
62+
"prefer-rest-params": "off",
63+
"@typescript-eslint/no-unused-vars": "off",
64+
"@typescript-eslint/no-explicit-any": "off",
65+
"@typescript-eslint/no-inferrable-types": "off",
66+
"@typescript-eslint/no-useless-constructor": "off",
67+
"@typescript-eslint/no-use-before-define": "off",
68+
"@typescript-eslint/no-non-null-assertion": "off",
69+
"@typescript-eslint/interface-name-prefix": "off",
70+
"@typescript-eslint/prefer-namespace-keyword": "off",
71+
"@typescript-eslint/explicit-function-return-type": "off",
72+
"@typescript-eslint/explicit-module-boundary-types": "off"
73+
}
74+
}
75+
]
76+
};
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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": "set PORT=4200 && react-scripts --max_old_space_size=10240 start",
11+
"build": "react-scripts --max_old_space_size=10240 build ",
12+
"test": "react-scripts test --env=jsdom",
13+
"eject": "react-scripts eject",
14+
"lint": "eslint ./src/**/*.{ts,tsx}"
15+
},
16+
"dependencies": {
17+
"igniteui-react": "18.6.1",
18+
"igniteui-react-charts": "18.6.1",
19+
"igniteui-react-core": "18.6.1",
20+
"igniteui-webcomponents": "4.9.0",
21+
"lit-html": "^2.2.0",
22+
"react": "^18.2.0",
23+
"react-dom": "^18.2.0",
24+
"react-scripts": "^5.0.1",
25+
"tslib": "^2.4.0"
26+
},
27+
"devDependencies": {
28+
"@types/jest": "^29.2.0",
29+
"@types/node": "^18.11.7",
30+
"@types/react": "^18.0.24",
31+
"@types/react-dom": "^18.0.8",
32+
"eslint": "^8.33.0",
33+
"eslint-config-react": "^1.1.7",
34+
"eslint-plugin-react": "^7.20.0",
35+
"react-app-rewired": "^2.2.1",
36+
"typescript": "^4.8.4",
37+
"worker-loader": "^3.0.8"
38+
},
39+
"browserslist": [
40+
">0.2%",
41+
"not dead",
42+
"not ie <= 11",
43+
"not op_mini all"
44+
]
45+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>Sample | Ignite UI | React | infragistics</title>
5+
<link rel="shortcut icon" href="https://static.infragistics.com/xplatform/images/browsers/react.png" >
6+
<link rel="stylesheet" href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css" />
7+
</head>
8+
<body>
9+
<div id="root"></div>
10+
</body>
11+
</html>
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: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
export class TemperatureAverageDataItem {
2+
public constructor(init: Partial<TemperatureAverageDataItem>) {
3+
Object.assign(this, init);
4+
}
5+
6+
public month: string;
7+
public temperature: number;
8+
9+
}
10+
export class TemperatureAverageData extends Array<TemperatureAverageDataItem> {
11+
public constructor(items: Array<TemperatureAverageDataItem> | number = -1) {
12+
if (Array.isArray(items)) {
13+
super(...items);
14+
} else {
15+
const newItems = [
16+
new TemperatureAverageDataItem(
17+
{
18+
month: `Jan`,
19+
temperature: 3
20+
}),
21+
new TemperatureAverageDataItem(
22+
{
23+
month: `Feb`,
24+
temperature: 4
25+
}),
26+
new TemperatureAverageDataItem(
27+
{
28+
month: `Mar`,
29+
temperature: 9
30+
}),
31+
new TemperatureAverageDataItem(
32+
{
33+
month: `Apr`,
34+
temperature: 15
35+
}),
36+
new TemperatureAverageDataItem(
37+
{
38+
month: `May`,
39+
temperature: 21
40+
}),
41+
new TemperatureAverageDataItem(
42+
{
43+
month: `Jun`,
44+
temperature: 26
45+
}),
46+
new TemperatureAverageDataItem(
47+
{
48+
month: `Jul`,
49+
temperature: 29
50+
}),
51+
new TemperatureAverageDataItem(
52+
{
53+
month: `Aug`,
54+
temperature: 28
55+
}),
56+
new TemperatureAverageDataItem(
57+
{
58+
month: `Sep`,
59+
temperature: 24
60+
}),
61+
new TemperatureAverageDataItem(
62+
{
63+
month: `Oct`,
64+
temperature: 18
65+
}),
66+
new TemperatureAverageDataItem(
67+
{
68+
month: `Nov`,
69+
temperature: 11
70+
}),
71+
new TemperatureAverageDataItem(
72+
{
73+
month: `Dec`,
74+
temperature: 5
75+
}),
76+
];
77+
super(...(newItems.slice(0, items)));
78+
}
79+
}
80+
}
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://static.infragistics.com/xplatform/css/samples */
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
import React from 'react';
2+
import ReactDOM from 'react-dom/client';
3+
import './index.css';
4+
5+
import { IgrCategoryChartModule, IgrDataChartInteractivityModule } from 'igniteui-react-charts';
6+
import { IgrCategoryChart } from 'igniteui-react-charts';
7+
import { TemperatureAverageDataItem, TemperatureAverageData } from './TemperatureAverageData';
8+
9+
const mods: any[] = [
10+
IgrCategoryChartModule,
11+
IgrDataChartInteractivityModule
12+
];
13+
mods.forEach((m) => m.register());
14+
15+
export default class Sample extends React.Component<any, any> {
16+
private chart: IgrCategoryChart
17+
private chartRef(r: IgrCategoryChart) {
18+
this.chart = r;
19+
this.setState({});
20+
}
21+
22+
constructor(props: any) {
23+
super(props);
24+
25+
this.chartRef = this.chartRef.bind(this);
26+
}
27+
28+
public render(): JSX.Element {
29+
return (
30+
<div className="container sample">
31+
32+
<div className="legend-title">
33+
Average Temperature Range in New York
34+
</div>
35+
36+
<div className="container fill">
37+
<IgrCategoryChart
38+
ref={this.chartRef}
39+
chartType="Column"
40+
dataSource={this.temperatureAverageData}
41+
yAxisTitle="Temperature in Degrees Celsius"
42+
yAxisTitleLeftMargin="10"
43+
yAxisTitleRightMargin="5"
44+
yAxisLabelLeftMargin="0"
45+
isHorizontalZoomEnabled="false"
46+
isVerticalZoomEnabled="false"
47+
crosshairsDisplayMode="None"
48+
toolTipType="None"
49+
selectionMode="SelectionColorFill"
50+
selectionBehavior="Auto"
51+
selectionBrush="purple"
52+
focusBrush="purple">
53+
</IgrCategoryChart>
54+
</div>
55+
</div>
56+
);
57+
}
58+
59+
private _temperatureAverageData: TemperatureAverageData = null;
60+
public get temperatureAverageData(): TemperatureAverageData {
61+
if (this._temperatureAverageData == null)
62+
{
63+
this._temperatureAverageData = new TemperatureAverageData();
64+
}
65+
return this._temperatureAverageData;
66+
}
67+
68+
}
69+
70+
// rendering above component in the React DOM
71+
const root = ReactDOM.createRoot(document.getElementById('root'));
72+
root.render(<Sample/>);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="react-scripts" />
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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+
"suppressImplicitAnyIndexErrors": true,
25+
"allowSyntheticDefaultImports": true,
26+
"skipLibCheck": true,
27+
"strict": false,
28+
"isolatedModules": true,
29+
"noEmit": true
30+
},
31+
"exclude": [
32+
"node_modules",
33+
"build",
34+
"scripts",
35+
"acceptance-tests",
36+
"webpack",
37+
"jest",
38+
"src/setupTests.ts",
39+
"**/odatajs-4.0.0.js",
40+
"config-overrides.js"
41+
],
42+
"include": [
43+
"src"
44+
]
45+
}

0 commit comments

Comments
 (0)