Skip to content

Commit a11a278

Browse files
author
tfsbuild
committed
Adding changes from build igniteui-xplat-examples-output+PRs_2025.2.6.1
1 parent 90ce6c4 commit a11a278

File tree

22 files changed

+820
-15
lines changed

22 files changed

+820
-15
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
export class DashboardGaugeDataSourceItem {
2+
public constructor(init: Partial<DashboardGaugeDataSourceItem>) {
3+
Object.assign(this, init);
4+
}
5+
6+
public value: number;
7+
8+
}
9+
export class DashboardGaugeDataSource extends Array<DashboardGaugeDataSourceItem> {
10+
public constructor(items: Array<DashboardGaugeDataSourceItem> | number = -1) {
11+
if (Array.isArray(items)) {
12+
super(...items);
13+
} else {
14+
const newItems = [
15+
new DashboardGaugeDataSourceItem(
16+
{
17+
value: 40
18+
}),
19+
];
20+
super(...newItems.slice(0));
21+
}
22+
}
23+
}

samples/charts/dashboard-tile/gauge-dashboard/src/index.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import './index.css';
44

55
import { IgrDashboardTileModule, IgrDataChartDashboardTileModule, IgrGeographicMapDashboardTileModule, IgrLinearGaugeDashboardTileModule, IgrPieChartDashboardTileModule, IgrRadialGaugeDashboardTileModule } from 'igniteui-react-dashboards';
66
import { IgrDashboardTile } from 'igniteui-react-dashboards';
7+
import { DashboardGaugeDataSourceItem, DashboardGaugeDataSource } from './DashboardGaugeDataSource';
78

89
const mods: any[] = [
910
IgrDashboardTileModule,
@@ -27,9 +28,6 @@ export default class Sample extends React.Component<any, any> {
2728

2829
this.dashboardRef = this.dashboardRef.bind(this);
2930
}
30-
public componentDidMount() {
31-
this.dashboardTileGaugeOnInit();
32-
}
3331

3432
public render(): JSX.Element {
3533
return (
@@ -38,19 +36,21 @@ export default class Sample extends React.Component<any, any> {
3836
<div className="container fill">
3937
<IgrDashboardTile
4038
tileTitle="Sample Gauge"
41-
ref={this.dashboardRef}>
39+
ref={this.dashboardRef}
40+
dataSource={this.dashboardGaugeDataSource}>
4241
</IgrDashboardTile>
4342
</div>
4443
</div>
4544
);
4645
}
4746

48-
49-
public dashboardTileGaugeOnInit(): void {
50-
51-
var target = this.dashboard;
52-
53-
target.dataSource = 40;
47+
private _dashboardGaugeDataSource: DashboardGaugeDataSource = null;
48+
public get dashboardGaugeDataSource(): DashboardGaugeDataSource {
49+
if (this._dashboardGaugeDataSource == null)
50+
{
51+
this._dashboardGaugeDataSource = new DashboardGaugeDataSource();
52+
}
53+
return this._dashboardGaugeDataSource;
5454
}
5555

5656
}

samples/charts/data-chart/radial-label-mode/src/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ export default class Sample extends React.Component<any, any> {
6060
<div className="options vertical">
6161
<IgrPropertyEditorPanel
6262
componentRenderer={this.renderer}
63-
target={this.angleAxis}
64-
descriptionType="CategoryAngleAxis"
63+
target={this.chart}
64+
descriptionType="DataChart"
6565
isHorizontal="true"
6666
isWrappingEnabled="true"
6767
ref={this.propertyEditorPanel1Ref}>
6868
<IgrPropertyEditorPropertyDescription
69-
propertyPath="LabelExtent"
69+
propertyPath="Axes[0 as CategoryAngleAxis].LabelExtent"
7070
name="LabelExtent"
7171
label="Label Extent"
7272
shouldOverrideDefaultEditor="true"
@@ -77,7 +77,7 @@ export default class Sample extends React.Component<any, any> {
7777
step="1">
7878
</IgrPropertyEditorPropertyDescription>
7979
<IgrPropertyEditorPropertyDescription
80-
propertyPath="LabelMode"
80+
propertyPath="Axes[0 as CategoryAngleAxis].LabelMode"
8181
name="LabelMode"
8282
label="LabelMode"
8383
shouldOverrideDefaultEditor="true"
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: 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.7.7",
18+
"igniteui-react-charts": "18.7.7",
19+
"igniteui-react-core": "18.7.7",
20+
"igniteui-webcomponents": "5.2.1",
21+
"lit-html": "^3.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: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
export class EnergyRenewableConsumptionItem {
2+
public constructor(init: Partial<EnergyRenewableConsumptionItem>) {
3+
Object.assign(this, init);
4+
}
5+
6+
public location: string;
7+
public year: number;
8+
public hydro: number;
9+
public solar: number;
10+
public wind: number;
11+
public other: number;
12+
13+
}
14+
export class EnergyRenewableConsumption extends Array<EnergyRenewableConsumptionItem> {
15+
public constructor(items: Array<EnergyRenewableConsumptionItem> | number = -1) {
16+
if (Array.isArray(items)) {
17+
super(...items);
18+
} else {
19+
const newItems = [
20+
new EnergyRenewableConsumptionItem(
21+
{
22+
location: `China`,
23+
year: 2019,
24+
hydro: 1269.5,
25+
solar: 223,
26+
wind: 405.2,
27+
other: 102.8
28+
}),
29+
new EnergyRenewableConsumptionItem(
30+
{
31+
location: `Europe`,
32+
year: 2019,
33+
hydro: 632.54,
34+
solar: 154,
35+
wind: 461.3,
36+
other: 220.3
37+
}),
38+
new EnergyRenewableConsumptionItem(
39+
{
40+
location: `USA`,
41+
year: 2019,
42+
hydro: 271.16,
43+
solar: 108,
44+
wind: 303.4,
45+
other: 78.34
46+
}),
47+
new EnergyRenewableConsumptionItem(
48+
{
49+
location: `Brazil`,
50+
year: 2019,
51+
hydro: 399.3,
52+
solar: 5.5,
53+
wind: 55.83,
54+
other: 56.25
55+
}),
56+
new EnergyRenewableConsumptionItem(
57+
{
58+
location: `Canada`,
59+
year: 2019,
60+
hydro: 381.98,
61+
solar: 4.3,
62+
wind: 34.17,
63+
other: 10.81
64+
}),
65+
];
66+
super(...newItems.slice(0));
67+
}
68+
}
69+
}
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 */

0 commit comments

Comments
 (0)