igniteui-cli 12.0.6 → 12.1.0-beta.0
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/new.js +4 -1
- package/lib/templates/IgniteUIForReactTemplate.js +0 -1
- package/package.json +3 -3
- package/templates/react/igr-es6/index.js +1 -1
- package/templates/react/igr-ts/bullet-graph/default/files/src/views/__path__/index.test.tsx +8 -0
- package/templates/react/igr-ts/bullet-graph/default/files/src/views/__path__/index.tsx +57 -0
- package/templates/react/igr-ts/bullet-graph/default/files/src/views/__path__/style.module.css +12 -0
- package/templates/react/igr-ts/bullet-graph/default/index.d.ts +1 -0
- package/templates/react/igr-ts/bullet-graph/default/index.js +18 -0
- package/templates/react/igr-ts/bullet-graph/index.d.ts +1 -0
- package/templates/react/igr-ts/bullet-graph/index.js +15 -0
- package/templates/react/igr-ts/category-chart/default/files/src/views/__path__/index.test.tsx +8 -0
- package/templates/react/igr-ts/category-chart/default/files/src/views/__path__/index.tsx +41 -0
- package/templates/react/igr-ts/category-chart/default/files/src/views/__path__/style.module.css +9 -0
- package/templates/react/igr-ts/category-chart/default/index.d.ts +1 -0
- package/templates/react/igr-ts/category-chart/default/index.js +19 -0
- package/templates/react/igr-ts/category-chart/index.d.ts +1 -0
- package/templates/react/igr-ts/category-chart/index.js +16 -0
- package/templates/react/igr-ts/doughnut-chart/default/files/src/views/__path__/index.test.tsx +8 -0
- package/templates/react/igr-ts/doughnut-chart/default/files/src/views/__path__/index.tsx +63 -0
- package/templates/react/igr-ts/doughnut-chart/default/files/src/views/__path__/style.module.css +9 -0
- package/templates/react/igr-ts/doughnut-chart/default/index.d.ts +1 -0
- package/templates/react/igr-ts/doughnut-chart/default/index.js +18 -0
- package/templates/react/igr-ts/doughnut-chart/index.d.ts +1 -0
- package/templates/react/igr-ts/doughnut-chart/index.js +15 -0
- package/templates/react/igr-ts/financial-chart/default/files/src/views/__path__/index.test.tsx +8 -0
- package/templates/react/igr-ts/financial-chart/default/files/src/views/__path__/index.tsx +49 -0
- package/templates/react/igr-ts/financial-chart/default/files/src/views/__path__/style.module.css +10 -0
- package/templates/react/igr-ts/financial-chart/default/index.d.ts +1 -0
- package/templates/react/igr-ts/financial-chart/default/index.js +20 -0
- package/templates/react/igr-ts/financial-chart/index.d.ts +1 -0
- package/templates/react/igr-ts/financial-chart/index.js +16 -0
- package/templates/react/igr-ts/grid/basic/files/src/views/__path__/data.tsx +46 -0
- package/templates/react/igr-ts/grid/basic/files/src/views/__path__/index.test.tsx +8 -0
- package/templates/react/igr-ts/grid/basic/files/src/views/__path__/index.tsx +63 -0
- package/templates/react/igr-ts/grid/basic/files/src/views/__path__/style.module.css +17 -0
- package/templates/react/igr-ts/grid/basic/index.d.ts +1 -0
- package/templates/react/igr-ts/grid/basic/index.js +23 -0
- package/templates/react/igr-ts/grid/index.d.ts +1 -0
- package/templates/react/igr-ts/grid/index.js +15 -0
- package/templates/react/igr-ts/groups.json +5 -0
- package/templates/react/igr-ts/index.d.ts +1 -0
- package/templates/react/igr-ts/index.js +17 -0
- package/templates/react/igr-ts/linear-gauge/default/files/src/views/__path__/index.test.tsx +8 -0
- package/templates/react/igr-ts/linear-gauge/default/files/src/views/__path__/index.tsx +60 -0
- package/templates/react/igr-ts/linear-gauge/default/files/src/views/__path__/style.module.css +12 -0
- package/templates/react/igr-ts/linear-gauge/default/index.d.ts +1 -0
- package/templates/react/igr-ts/linear-gauge/default/index.js +18 -0
- package/templates/react/igr-ts/linear-gauge/index.d.ts +1 -0
- package/templates/react/igr-ts/linear-gauge/index.js +15 -0
- package/templates/react/igr-ts/pie-chart/default/files/src/views/__path__/index.test.tsx +8 -0
- package/templates/react/igr-ts/pie-chart/default/files/src/views/__path__/index.tsx +57 -0
- package/templates/react/igr-ts/pie-chart/default/files/src/views/__path__/style.module.css +9 -0
- package/templates/react/igr-ts/pie-chart/default/index.d.ts +1 -0
- package/templates/react/igr-ts/pie-chart/default/index.js +18 -0
- package/templates/react/igr-ts/pie-chart/index.d.ts +1 -0
- package/templates/react/igr-ts/pie-chart/index.js +15 -0
- package/templates/react/igr-ts/projects/_base/files/README.md +48 -0
- package/templates/react/igr-ts/projects/_base/files/__dot__editorconfig +3 -0
- package/templates/react/igr-ts/projects/_base/files/__dot__env +1 -0
- package/templates/react/igr-ts/projects/_base/files/__dot__eslintrc.cjs +18 -0
- package/templates/react/igr-ts/projects/_base/files/__dot__gitignore +23 -0
- package/templates/react/igr-ts/projects/_base/files/ignite-ui-cli.json +16 -0
- package/templates/react/igr-ts/projects/_base/files/index.html +33 -0
- package/templates/react/igr-ts/projects/_base/files/package.json +52 -0
- package/templates/react/igr-ts/projects/_base/files/public/favicon.ico +0 -0
- package/templates/react/igr-ts/projects/_base/files/public/manifest.json +15 -0
- package/templates/react/igr-ts/projects/_base/files/src/App.test.tsx +8 -0
- package/templates/react/igr-ts/projects/_base/files/src/App.tsx +10 -0
- package/templates/react/igr-ts/projects/_base/files/src/index.css +14 -0
- package/templates/react/igr-ts/projects/_base/files/src/main.tsx +17 -0
- package/templates/react/igr-ts/projects/_base/files/src/routes.json +3 -0
- package/templates/react/igr-ts/projects/_base/files/src/setupTests.ts +5 -0
- package/templates/react/igr-ts/projects/_base/files/src/vite-env.d.ts +1 -0
- package/templates/react/igr-ts/projects/_base/files/tsconfig.json +25 -0
- package/templates/react/igr-ts/projects/_base/files/tsconfig.node.json +10 -0
- package/templates/react/igr-ts/projects/_base/files/vite.config.ts +20 -0
- package/templates/react/igr-ts/projects/_base/index.d.ts +29 -0
- package/templates/react/igr-ts/projects/_base/index.js +58 -0
- package/templates/react/igr-ts/projects/_base_with_home/files/public/logo.svg +7 -0
- package/templates/react/igr-ts/projects/_base_with_home/files/src/App.module.css +36 -0
- package/templates/react/igr-ts/projects/_base_with_home/files/src/App.test.tsx +8 -0
- package/templates/react/igr-ts/projects/_base_with_home/files/src/App.tsx +21 -0
- package/templates/react/igr-ts/projects/_base_with_home/files/src/setupTests.ts +5 -0
- package/templates/react/igr-ts/projects/_base_with_home/index.d.ts +14 -0
- package/templates/react/igr-ts/projects/_base_with_home/index.js +22 -0
- package/templates/react/igr-ts/projects/base/index.d.ts +14 -0
- package/templates/react/igr-ts/projects/base/index.js +22 -0
- package/templates/react/igr-ts/projects/empty/index.d.ts +14 -0
- package/templates/react/igr-ts/projects/empty/index.js +22 -0
- package/templates/react/igr-ts/projects/top-nav/files/src/App.css +59 -0
- package/templates/react/igr-ts/projects/top-nav/files/src/App.tsx +31 -0
- package/templates/react/igr-ts/projects/top-nav/files/src/components/navigation-header/index.tsx +29 -0
- package/templates/react/igr-ts/projects/top-nav/files/src/hoc/asyncComponent.tsx +50 -0
- package/templates/react/igr-ts/projects/top-nav/files/src/routes.json +7 -0
- package/templates/react/igr-ts/projects/top-nav/files/src/setupTests.ts +5 -0
- package/templates/react/igr-ts/projects/top-nav/files/src/views/home/index.tsx +17 -0
- package/templates/react/igr-ts/projects/top-nav/files/src/views/home/logo.svg +7 -0
- package/templates/react/igr-ts/projects/top-nav/files/src/views/home/style.module.css +27 -0
- package/templates/react/igr-ts/projects/top-nav/index.d.ts +14 -0
- package/templates/react/igr-ts/projects/top-nav/index.js +22 -0
- package/templates/react/igr-ts/radial-gauge/default/files/src/views/__path__/index.test.tsx +8 -0
- package/templates/react/igr-ts/radial-gauge/default/files/src/views/__path__/index.tsx +61 -0
- package/templates/react/igr-ts/radial-gauge/default/files/src/views/__path__/style.module.css +12 -0
- package/templates/react/igr-ts/radial-gauge/default/index.d.ts +1 -0
- package/templates/react/igr-ts/radial-gauge/default/index.js +19 -0
- package/templates/react/igr-ts/radial-gauge/index.d.ts +1 -0
- package/templates/react/igr-ts/radial-gauge/index.js +16 -0
- package/templates/react/index.js +1 -0
package/lib/commands/new.js
CHANGED
|
@@ -107,7 +107,10 @@ command = {
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
const theme = projectLib.themes[themeIndex];
|
|
110
|
-
const
|
|
110
|
+
const indexOfEmptyOrFirst = projectLib.projectIds.indexOf("empty") !== -1 ?
|
|
111
|
+
projectLib.projectIds.indexOf("empty") :
|
|
112
|
+
0;
|
|
113
|
+
const projectTemplate = argv.template || projectLib.projectIds[indexOfEmptyOrFirst];
|
|
111
114
|
cli_core_1.Util.log(`Project Name: ${argv.name}, framework ${argv.framework}, type ${projectLib.projectType}, theme ${theme}`);
|
|
112
115
|
const projTemplate = projectLib.getProject(projectTemplate);
|
|
113
116
|
if (projTemplate == null) {
|
|
@@ -15,7 +15,6 @@ class IgniteUIForReactTemplate {
|
|
|
15
15
|
this.listInCustomTemplates = false;
|
|
16
16
|
this.dependencies = [];
|
|
17
17
|
this.framework = "react";
|
|
18
|
-
this.projectType = "igr-es6";
|
|
19
18
|
this.hasExtraConfiguration = false;
|
|
20
19
|
this.packages = [];
|
|
21
20
|
this.delimiters = cli_core_1.defaultDelimiters;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "igniteui-cli",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.1.0-beta.0",
|
|
4
4
|
"description": "CLI tool for creating Ignite UI projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"CLI",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"all": true
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@igniteui/angular-templates": "~16.0.
|
|
76
|
-
"@igniteui/cli-core": "~12.0.
|
|
75
|
+
"@igniteui/angular-templates": "~16.0.1210-beta.0",
|
|
76
|
+
"@igniteui/cli-core": "~12.1.0-beta.0",
|
|
77
77
|
"chalk": "^2.3.2",
|
|
78
78
|
"fs-extra": "^3.0.1",
|
|
79
79
|
"glob": "^7.1.2",
|
|
@@ -4,7 +4,7 @@ const cli_core_1 = require("@igniteui/cli-core");
|
|
|
4
4
|
class IgrReactProjectLibrary extends cli_core_1.BaseProjectLibrary {
|
|
5
5
|
constructor() {
|
|
6
6
|
super(__dirname);
|
|
7
|
-
this.name = "Ignite UI for React";
|
|
7
|
+
this.name = "Ignite UI for React (deprecated)";
|
|
8
8
|
this.projectType = "igr-es6";
|
|
9
9
|
this.themes = ["default"];
|
|
10
10
|
const groups = require("./groups.json");
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IgrBulletGraphModule } from 'igniteui-react-gauges';
|
|
3
|
+
import { IgrBulletGraph } from 'igniteui-react-gauges';
|
|
4
|
+
import style from './style.module.css';
|
|
5
|
+
|
|
6
|
+
IgrBulletGraphModule.register();
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export default function $(ClassName)() {
|
|
10
|
+
const title = 'Bullet Graph';
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<div>
|
|
14
|
+
<h1 className={style.title}>{title}</h1>
|
|
15
|
+
<div>
|
|
16
|
+
Read more on the
|
|
17
|
+
<a href="https://www.infragistics.com/products/ignite-ui-react/react/components/bulletgraph.html">
|
|
18
|
+
official documentation page
|
|
19
|
+
</a>
|
|
20
|
+
</div>
|
|
21
|
+
<div className={style.container}>
|
|
22
|
+
<div className={style.graph}>
|
|
23
|
+
<IgrBulletGraph
|
|
24
|
+
height="80px" width="400px"
|
|
25
|
+
minimumValue={0} value={70} interval={10}
|
|
26
|
+
maximumValue={100} targetValue={90}
|
|
27
|
+
isScaleInverted={false}
|
|
28
|
+
scaleBackgroundBrush="DodgerBlue"
|
|
29
|
+
scaleBackgroundOutline="DarkViolet"
|
|
30
|
+
scaleBackgroundThickness={2}
|
|
31
|
+
scaleStartExtent={0.05}
|
|
32
|
+
scaleEndExtent={0.95}>
|
|
33
|
+
</IgrBulletGraph>
|
|
34
|
+
</div>
|
|
35
|
+
<div className={style.graph}>
|
|
36
|
+
<IgrBulletGraph
|
|
37
|
+
value={50}
|
|
38
|
+
valueBrush="DodgerBlue"
|
|
39
|
+
valueStrokeThickness={1}
|
|
40
|
+
valueInnerExtent={0.5}
|
|
41
|
+
valueOuterExtent={0.65}
|
|
42
|
+
targetValue={80}
|
|
43
|
+
targetValueBreadth={10}
|
|
44
|
+
targetValueBrush="LimeGreen"
|
|
45
|
+
targetValueOutline="LimeGreen"
|
|
46
|
+
targetValueStrokeThickness={1}
|
|
47
|
+
targetValueInnerExtent={0.3}
|
|
48
|
+
targetValueOuterExtent={0.85}
|
|
49
|
+
height="80px" width="400px"
|
|
50
|
+
minimumValue={0}
|
|
51
|
+
maximumValue={100}>
|
|
52
|
+
</IgrBulletGraph>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
)
|
|
57
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const IgniteUIForReactTemplate_1 = require("../../../../../lib/templates/IgniteUIForReactTemplate");
|
|
4
|
+
class IgrTsBulletGraphTemplate extends IgniteUIForReactTemplate_1.IgniteUIForReactTemplate {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(__dirname);
|
|
7
|
+
this.components = ["Bullet Graph"];
|
|
8
|
+
this.controlGroup = "Gauges";
|
|
9
|
+
this.listInComponentTemplates = true;
|
|
10
|
+
this.id = "bullet-graph";
|
|
11
|
+
this.projectType = "igr-ts";
|
|
12
|
+
this.name = "Bullet Graph";
|
|
13
|
+
this.description = `allows for a linear and concise view of measures compared against a scale.`;
|
|
14
|
+
// TODO: read version from igniteui-react-core in package.json
|
|
15
|
+
this.packages = ["igniteui-react-gauges@18.2.2-beta.0"];
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
module.exports = new IgrTsBulletGraphTemplate();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const cli_core_1 = require("@igniteui/cli-core");
|
|
4
|
+
class IgrTsBulletGraphComponent extends cli_core_1.BaseComponent {
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
constructor() {
|
|
9
|
+
super(__dirname);
|
|
10
|
+
this.name = "Bullet Graph";
|
|
11
|
+
this.group = "Gauges";
|
|
12
|
+
this.description = `allows for a linear and concise view of measures compared against a scale.`;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
module.exports = new IgrTsBulletGraphComponent();
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { IgrCategoryChartModule } from 'igniteui-react-charts';
|
|
3
|
+
import { IgrCategoryChart } from 'igniteui-react-charts';
|
|
4
|
+
import style from './style.module.css';
|
|
5
|
+
|
|
6
|
+
IgrCategoryChartModule.register();
|
|
7
|
+
|
|
8
|
+
const data = [
|
|
9
|
+
{ 'CountryName': 'China', 'Pop1995': 1216, 'Pop2005': 1297, 'Pop2015': 1361, 'Pop2025': 1394 },
|
|
10
|
+
{ 'CountryName': 'India', 'Pop1995': 920, 'Pop2005': 1090, 'Pop2015': 1251, 'Pop2025': 1396 },
|
|
11
|
+
{ 'CountryName': 'United States', 'Pop1995': 266, 'Pop2005': 295, 'Pop2015': 322, 'Pop2025': 351 },
|
|
12
|
+
{ 'CountryName': 'Indonesia', 'Pop1995': 197, 'Pop2005': 229, 'Pop2015': 256, 'Pop2025': 277 },
|
|
13
|
+
{ 'CountryName': 'Brazil', 'Pop1995': 161, 'Pop2005': 186, 'Pop2015': 204, 'Pop2025': 218 }
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
export default function $(ClassName)() {
|
|
17
|
+
const title = 'Category Chart';
|
|
18
|
+
const [chartData, setChartData] = useState([]);
|
|
19
|
+
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
setChartData(data);
|
|
22
|
+
}, []);
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<div>
|
|
26
|
+
<h1 className={style.title}>{title}</h1>
|
|
27
|
+
<div>
|
|
28
|
+
Read more on the
|
|
29
|
+
<a href="https://www.infragistics.com/products/ignite-ui-react/react/components/categorychart.html">
|
|
30
|
+
official documentation page
|
|
31
|
+
</a>
|
|
32
|
+
</div>
|
|
33
|
+
<div className={style.container}>
|
|
34
|
+
<IgrCategoryChart dataSource={chartData}
|
|
35
|
+
width="100%"
|
|
36
|
+
height="500px">
|
|
37
|
+
</IgrCategoryChart>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const IgniteUIForReactTemplate_1 = require("../../../../../lib/templates/IgniteUIForReactTemplate");
|
|
4
|
+
class IgrTsCategoryChartTemplate extends IgniteUIForReactTemplate_1.IgniteUIForReactTemplate {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(__dirname);
|
|
7
|
+
this.components = ["Category Chart"];
|
|
8
|
+
this.controlGroup = "Charts";
|
|
9
|
+
this.listInComponentTemplates = true;
|
|
10
|
+
this.id = "category-chart";
|
|
11
|
+
this.projectType = "igr-ts";
|
|
12
|
+
this.name = "Category Chart";
|
|
13
|
+
this.description = `makes visualizing category data easy. Simplifies the complexities
|
|
14
|
+
of the data visualization domain into manageable API`;
|
|
15
|
+
// TODO: read version from igniteui-react-core in package.json
|
|
16
|
+
this.packages = ["igniteui-react-charts@18.2.2-beta.0"];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
module.exports = new IgrTsCategoryChartTemplate();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const cli_core_1 = require("@igniteui/cli-core");
|
|
4
|
+
class IgrTsCategoryChartComponent extends cli_core_1.BaseComponent {
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
constructor() {
|
|
9
|
+
super(__dirname);
|
|
10
|
+
this.name = "Category Chart";
|
|
11
|
+
this.group = "Charts";
|
|
12
|
+
this.description = `makes visualizing category data easy. Simplifies the complexities
|
|
13
|
+
of the data visualization domain into manageable API`;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
module.exports = new IgrTsCategoryChartComponent();
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { IgrDoughnutChartModule } from 'igniteui-react-charts';
|
|
3
|
+
import { IgrDoughnutChart } from 'igniteui-react-charts';
|
|
4
|
+
import { IgrRingSeriesModule } from 'igniteui-react-charts';
|
|
5
|
+
import { IgrRingSeries } from 'igniteui-react-charts';
|
|
6
|
+
import { IgrItemLegendModule } from 'igniteui-react-charts';
|
|
7
|
+
import { IgrItemLegend } from 'igniteui-react-charts';
|
|
8
|
+
import style from './style.module.css';
|
|
9
|
+
|
|
10
|
+
IgrItemLegendModule.register();
|
|
11
|
+
|
|
12
|
+
IgrDoughnutChartModule.register();
|
|
13
|
+
IgrRingSeriesModule.register();
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
const data = [
|
|
17
|
+
{ MarketShare: 30, Company: "Google", },
|
|
18
|
+
{ MarketShare: 15, Company: "Microsoft", },
|
|
19
|
+
{ MarketShare: 30, Company: "Apple", },
|
|
20
|
+
{ MarketShare: 15, Company: "Samsung", },
|
|
21
|
+
{ MarketShare: 10, Company: "Other", },
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
export default function $(ClassName)() {
|
|
25
|
+
const title = 'Doughnut Chart';
|
|
26
|
+
const [chartData, setChartData] = useState([]);
|
|
27
|
+
const legendRef = useRef();
|
|
28
|
+
const chartRef = useRef();
|
|
29
|
+
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
setChartData(data);
|
|
32
|
+
}, []);
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<div>
|
|
36
|
+
<h1 className={style.title}>{title}</h1>
|
|
37
|
+
<div>
|
|
38
|
+
Read more on the
|
|
39
|
+
<a href="https://www.infragistics.com/products/ignite-ui-react/react/components/doughnutchart.html">
|
|
40
|
+
official documentation page
|
|
41
|
+
</a>
|
|
42
|
+
</div>
|
|
43
|
+
<div className={style.container}>
|
|
44
|
+
<div className={style.legend}>
|
|
45
|
+
<IgrItemLegend ref={legendRef} />
|
|
46
|
+
</div>
|
|
47
|
+
<div className={style.chart}>
|
|
48
|
+
<IgrDoughnutChart ref={chartRef}
|
|
49
|
+
width="300px"
|
|
50
|
+
height="300px">
|
|
51
|
+
<IgrRingSeries
|
|
52
|
+
name="ring1"
|
|
53
|
+
dataSource={chartData}
|
|
54
|
+
labelMemberPath="Company"
|
|
55
|
+
valueMemberPath="MarketShare"
|
|
56
|
+
legend={legendRef.current}
|
|
57
|
+
/>
|
|
58
|
+
</IgrDoughnutChart>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
)
|
|
63
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const IgniteUIForReactTemplate_1 = require("../../../../../lib/templates/IgniteUIForReactTemplate");
|
|
4
|
+
class IgrTsDoughnutChartTemplate extends IgniteUIForReactTemplate_1.IgniteUIForReactTemplate {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(__dirname);
|
|
7
|
+
this.components = ["Doughnut Chart"];
|
|
8
|
+
this.controlGroup = "Charts";
|
|
9
|
+
this.listInComponentTemplates = true;
|
|
10
|
+
this.id = "doughnut-chart";
|
|
11
|
+
this.projectType = "igr-ts";
|
|
12
|
+
this.name = "Doughnut Chart";
|
|
13
|
+
this.description = `proportionally illustrate the occurrences of variables.`;
|
|
14
|
+
// TODO: read version from igniteui-react-core in package.json
|
|
15
|
+
this.packages = ["igniteui-react-charts@18.2.2-beta.0"];
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
module.exports = new IgrTsDoughnutChartTemplate();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const cli_core_1 = require("@igniteui/cli-core");
|
|
4
|
+
class IgrTsDoughnutChartComponent extends cli_core_1.BaseComponent {
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
constructor() {
|
|
9
|
+
super(__dirname);
|
|
10
|
+
this.name = "Doughnut Chart";
|
|
11
|
+
this.group = "Charts";
|
|
12
|
+
this.description = `proportionally illustrate the occurrences of variables.`;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
module.exports = new IgrTsDoughnutChartComponent();
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react'
|
|
2
|
+
import { IgrFinancialChartModule } from 'igniteui-react-charts';
|
|
3
|
+
import { IgrFinancialChart } from 'igniteui-react-charts';
|
|
4
|
+
import style from './style.module.css';
|
|
5
|
+
|
|
6
|
+
IgrFinancialChartModule.register();
|
|
7
|
+
|
|
8
|
+
const data = [
|
|
9
|
+
{ time: new Date(2013, 1, 1), open: 268.93, high: 268.93, low: 262.80, close: 265.00, volume: 6118146 },
|
|
10
|
+
{ time: new Date(2013, 1, 4), open: 262.78, high: 264.68, low: 259.07, close: 259.98, volume: 3723793 },
|
|
11
|
+
{ time: new Date(2013, 1, 5), open: 262.00, high: 268.03, low: 261.46, close: 266.89, volume: 4013780 },
|
|
12
|
+
{ time: new Date(2013, 1, 6), open: 265.16, high: 266.89, low: 261.11, close: 262.22, volume: 2772204 },
|
|
13
|
+
{ time: new Date(2013, 1, 7), open: 264.10, high: 264.10, low: 255.11, close: 260.23, volume: 3977065 },
|
|
14
|
+
{ time: new Date(2013, 1, 8), open: 261.40, high: 265.25, low: 260.56, close: 261.95, volume: 3879628 },
|
|
15
|
+
{ time: new Date(2013, 1, 11), open: 263.20, high: 263.25, low: 256.60, close: 257.21, volume: 3407457 },
|
|
16
|
+
{ time: new Date(2013, 1, 12), open: 259.19, high: 260.16, low: 257.00, close: 258.70, volume: 2944730 },
|
|
17
|
+
{ time: new Date(2013, 1, 13), open: 261.53, high: 269.96, low: 260.30, close: 269.47, volume: 5295786 },
|
|
18
|
+
{ time: new Date(2013, 1, 14), open: 267.37, high: 270.65, low: 265.40, close: 269.24, volume: 3464080 },
|
|
19
|
+
{ time: new Date(2013, 1, 15), open: 267.63, high: 268.92, low: 263.11, close: 265.09, volume: 3981233 }
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
export default function $(ClassName)() {
|
|
24
|
+
const title = 'Financial Chart';
|
|
25
|
+
const [chartData, setChartData] = useState([]);
|
|
26
|
+
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
setChartData(data);
|
|
29
|
+
}, []);
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<div>
|
|
33
|
+
<h1 className={style.title}>{title}</h1>
|
|
34
|
+
<div>
|
|
35
|
+
Read more on the
|
|
36
|
+
<a href="https://www.infragistics.com/products/ignite-ui-react/react/components/financialchart.html">
|
|
37
|
+
official documentation page
|
|
38
|
+
</a>
|
|
39
|
+
</div>
|
|
40
|
+
<div className={style.container}>
|
|
41
|
+
<IgrFinancialChart
|
|
42
|
+
width="700px"
|
|
43
|
+
height="500px"
|
|
44
|
+
dataSource={chartData}>
|
|
45
|
+
</IgrFinancialChart>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
)
|
|
49
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const IgniteUIForReactTemplate_1 = require("../../../../../lib/templates/IgniteUIForReactTemplate");
|
|
4
|
+
class IgrTsFinancialChartTemplate extends IgniteUIForReactTemplate_1.IgniteUIForReactTemplate {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(__dirname);
|
|
7
|
+
this.components = ["Financial Chart"];
|
|
8
|
+
this.controlGroup = "Charts";
|
|
9
|
+
// set to true once bug with chart destoy is fixed
|
|
10
|
+
this.listInComponentTemplates = false;
|
|
11
|
+
this.id = "financial-chart";
|
|
12
|
+
this.projectType = "igr-ts";
|
|
13
|
+
this.name = "Financial Chart";
|
|
14
|
+
this.description = `charting component that makes it easy to visualize financial data by
|
|
15
|
+
using a simple and intuitive API.`;
|
|
16
|
+
// TODO: read version from igniteui-react-core in package.json
|
|
17
|
+
this.packages = ["igniteui-react-charts@18.2.2-beta.0"];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
module.exports = new IgrTsFinancialChartTemplate();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const cli_core_1 = require("@igniteui/cli-core");
|
|
4
|
+
class IgrTsFinancialChartComponent extends cli_core_1.BaseComponent {
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
constructor() {
|
|
9
|
+
super(__dirname);
|
|
10
|
+
this.name = "Financial Chart";
|
|
11
|
+
this.group = "Charts";
|
|
12
|
+
this.description = `charting component that makes it easy to visualize financial data by
|
|
13
|
+
using a simple and intuitive API.`;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
module.exports = new IgrTsFinancialChartComponent();
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export default [{
|
|
2
|
+
Discontinued: false,
|
|
3
|
+
OrderDate: new Date('2012-02-12'),
|
|
4
|
+
ProductID: 1,
|
|
5
|
+
ProductName: 'Chai',
|
|
6
|
+
QuantityPerUnit: '10 boxes x 20 bags',
|
|
7
|
+
ReorderLevel: 10,
|
|
8
|
+
UnitPrice: 18.0000,
|
|
9
|
+
UnitsInStock: 39
|
|
10
|
+
}, {
|
|
11
|
+
Discontinued: false,
|
|
12
|
+
OrderDate: new Date('2003-03-17'),
|
|
13
|
+
ProductID: 2,
|
|
14
|
+
ProductName: 'Chang',
|
|
15
|
+
QuantityPerUnit: '24 - 12 oz bottles',
|
|
16
|
+
ReorderLevel: 25,
|
|
17
|
+
UnitPrice: 19.0000,
|
|
18
|
+
UnitsInStock: 17
|
|
19
|
+
}, {
|
|
20
|
+
Discontinued: false,
|
|
21
|
+
OrderDate: new Date('2006-03-17'),
|
|
22
|
+
ProductID: 3,
|
|
23
|
+
ProductName: 'Aniseed Syrup',
|
|
24
|
+
QuantityPerUnit: '12 - 550 ml bottles',
|
|
25
|
+
ReorderLevel: 25,
|
|
26
|
+
UnitPrice: 10.0000,
|
|
27
|
+
UnitsInStock: 13
|
|
28
|
+
}, {
|
|
29
|
+
Discontinued: false,
|
|
30
|
+
OrderDate: new Date('2016-03-17'),
|
|
31
|
+
ProductID: 4,
|
|
32
|
+
ProductName: 'Chef Antons Cajun Seasoning',
|
|
33
|
+
QuantityPerUnit: '48 - 6 oz jars',
|
|
34
|
+
ReorderLevel: 0,
|
|
35
|
+
UnitPrice: 22.0000,
|
|
36
|
+
UnitsInStock: 53
|
|
37
|
+
}, {
|
|
38
|
+
Discontinued: true,
|
|
39
|
+
OrderDate: new Date('2011-11-11'),
|
|
40
|
+
ProductID: 5,
|
|
41
|
+
ProductName: 'Chef Antons Gumbo Mix',
|
|
42
|
+
QuantityPerUnit: '36 boxes',
|
|
43
|
+
ReorderLevel: 0,
|
|
44
|
+
UnitPrice: 21.3500,
|
|
45
|
+
UnitsInStock: 0
|
|
46
|
+
}];
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { React } from 'react';
|
|
2
|
+
import style from './style.module.css';
|
|
3
|
+
import 'igniteui-react-grids/grids';
|
|
4
|
+
import { IgrGridModule, IgrGrid, IgrColumn } from 'igniteui-react-grids';
|
|
5
|
+
import 'igniteui-react-grids/grids/themes/light/bootstrap.css'
|
|
6
|
+
|
|
7
|
+
import data from './data';
|
|
8
|
+
|
|
9
|
+
IgrGridModule.register();
|
|
10
|
+
|
|
11
|
+
export default function $(ClassName)() {
|
|
12
|
+
const title = 'Grid';
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<div>
|
|
16
|
+
<h1 className={style.title}>{title}</h1>
|
|
17
|
+
<div>
|
|
18
|
+
Read more on the
|
|
19
|
+
<a href="https://www.infragistics.com/products/ignite-ui-react/react/components/grid.html">
|
|
20
|
+
official documentation page
|
|
21
|
+
</a>
|
|
22
|
+
</div>
|
|
23
|
+
<div className={style.container}>
|
|
24
|
+
<div className={style.grid}>
|
|
25
|
+
<IgrGrid
|
|
26
|
+
autoGenerate="false"
|
|
27
|
+
data={data}>
|
|
28
|
+
<IgrColumn
|
|
29
|
+
field="ProductID"
|
|
30
|
+
header="Product ID"
|
|
31
|
+
dataType="Number">
|
|
32
|
+
</IgrColumn>
|
|
33
|
+
<IgrColumn
|
|
34
|
+
field="ProductName"
|
|
35
|
+
header="Product Name"
|
|
36
|
+
dataType="String">
|
|
37
|
+
</IgrColumn>
|
|
38
|
+
<IgrColumn
|
|
39
|
+
field="QuantityPerUnit"
|
|
40
|
+
header="Quantity Per Unit"
|
|
41
|
+
dataType="String">
|
|
42
|
+
</IgrColumn>
|
|
43
|
+
<IgrColumn
|
|
44
|
+
field="UnitsInStock"
|
|
45
|
+
header="Units In Stock"
|
|
46
|
+
dataType="Number">
|
|
47
|
+
</IgrColumn>
|
|
48
|
+
<IgrColumn
|
|
49
|
+
field="OrderDate"
|
|
50
|
+
header="Order Date"
|
|
51
|
+
dataType="Date">
|
|
52
|
+
</IgrColumn>
|
|
53
|
+
</IgrGrid>
|
|
54
|
+
</div>
|
|
55
|
+
<div className={style.grid}>
|
|
56
|
+
<IgrGrid
|
|
57
|
+
autoGenerate="true"
|
|
58
|
+
data={data} />
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
)
|
|
63
|
+
}
|