igniteui-cli 13.0.2 → 13.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/add.js +17 -5
- package/lib/commands/new.js +4 -1
- package/lib/commands/start.js +11 -6
- package/lib/templates/IgniteUIForReactTemplate.d.ts +2 -2
- package/lib/templates/IgniteUIForReactTemplate.js +36 -12
- package/package.json +3 -3
- package/templates/angular/index.js +1 -1
- package/templates/react/ReactTypeScriptFileUpdate.d.ts +50 -0
- package/templates/react/ReactTypeScriptFileUpdate.js +333 -0
- package/templates/react/igr-es6/index.js +1 -1
- package/templates/react/igr-ts/bullet-graph/default/files/src/app/__path__/__filePrefix__.test.tsx +8 -0
- package/templates/react/igr-ts/bullet-graph/default/files/src/app/__path__/__filePrefix__.tsx +56 -0
- package/templates/react/igr-ts/bullet-graph/default/files/src/app/__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/app/__path__/__filePrefix__.test.tsx +8 -0
- package/templates/react/igr-ts/category-chart/default/files/src/app/__path__/__filePrefix__.tsx +41 -0
- package/templates/react/igr-ts/category-chart/default/files/src/app/__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/app/__path__/__filePrefix__.test.tsx +8 -0
- package/templates/react/igr-ts/doughnut-chart/default/files/src/app/__path__/__filePrefix__.tsx +63 -0
- package/templates/react/igr-ts/doughnut-chart/default/files/src/app/__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/app/__path__/__filePrefix__.test.tsx +8 -0
- package/templates/react/igr-ts/financial-chart/default/files/src/app/__path__/__filePrefix__.tsx +49 -0
- package/templates/react/igr-ts/financial-chart/default/files/src/app/__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/app/__path__/__filePrefix__.test.tsx +8 -0
- package/templates/react/igr-ts/grid/basic/files/src/app/__path__/__filePrefix__.tsx +58 -0
- package/templates/react/igr-ts/grid/basic/files/src/app/__path__/data.tsx +46 -0
- package/templates/react/igr-ts/grid/basic/files/src/app/__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/app/__path__/__filePrefix__.test.tsx +8 -0
- package/templates/react/igr-ts/linear-gauge/default/files/src/app/__path__/__filePrefix__.tsx +59 -0
- package/templates/react/igr-ts/linear-gauge/default/files/src/app/__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/app/__path__/__filePrefix__.test.tsx +8 -0
- package/templates/react/igr-ts/pie-chart/default/files/src/app/__path__/__filePrefix__.tsx +57 -0
- package/templates/react/igr-ts/pie-chart/default/files/src/app/__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__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 +28 -0
- package/templates/react/igr-ts/projects/_base/files/package.json +51 -0
- package/templates/react/igr-ts/projects/_base/files/public/favicon.ico +0 -0
- package/templates/react/igr-ts/projects/_base/files/src/app/App.test.tsx +8 -0
- package/templates/react/igr-ts/projects/_base/files/src/app/App.tsx +12 -0
- package/templates/react/igr-ts/projects/_base/files/src/app/app-routes.tsx +3 -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 +25 -0
- package/templates/react/igr-ts/projects/_base/files/src/setupTests.ts +5 -0
- package/templates/react/igr-ts/projects/_base/files/tsconfig.json +26 -0
- package/templates/react/igr-ts/projects/_base/files/vite.config.ts +23 -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/app-routes.tsx +5 -0
- package/templates/react/igr-ts/projects/_base_with_home/files/src/app/home/home.tsx +24 -0
- package/templates/react/igr-ts/projects/_base_with_home/files/src/app/home/style.module.css +36 -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/App.css +62 -0
- package/templates/react/igr-ts/projects/top-nav/files/src/app/App.tsx +18 -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/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/app/__path__/__filePrefix__.test.tsx +8 -0
- package/templates/react/igr-ts/radial-gauge/default/files/src/app/__path__/__filePrefix__.tsx +60 -0
- package/templates/react/igr-ts/radial-gauge/default/files/src/app/__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
|
@@ -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.3.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();
|
package/templates/react/igr-ts/category-chart/default/files/src/app/__path__/__filePrefix__.tsx
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { 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.3.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();
|
package/templates/react/igr-ts/doughnut-chart/default/files/src/app/__path__/__filePrefix__.tsx
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { 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.3.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();
|
package/templates/react/igr-ts/financial-chart/default/files/src/app/__path__/__filePrefix__.tsx
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { 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.3.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,58 @@
|
|
|
1
|
+
import style from './style.module.css';
|
|
2
|
+
import 'igniteui-react-grids/grids';
|
|
3
|
+
import { IgrGridModule, IgrGrid, IgrColumn } from 'igniteui-react-grids';
|
|
4
|
+
import 'igniteui-react-grids/grids/themes/light/bootstrap.css'
|
|
5
|
+
|
|
6
|
+
import data from './data';
|
|
7
|
+
|
|
8
|
+
IgrGridModule.register();
|
|
9
|
+
|
|
10
|
+
export default function $(ClassName)() {
|
|
11
|
+
const title = 'Grid';
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<div>
|
|
15
|
+
<h1 className={style.title}>{title}</h1>
|
|
16
|
+
<div>
|
|
17
|
+
Read more on the
|
|
18
|
+
<a href="https://www.infragistics.com/products/ignite-ui-react/react/components/grid.html">
|
|
19
|
+
official documentation page
|
|
20
|
+
</a>
|
|
21
|
+
</div>
|
|
22
|
+
<div className={style.container}>
|
|
23
|
+
<div className={style.grid}>
|
|
24
|
+
<IgrGrid autoGenerate="false" data={data}>
|
|
25
|
+
<IgrColumn
|
|
26
|
+
field="ProductID"
|
|
27
|
+
header="Product ID"
|
|
28
|
+
dataType="Number"
|
|
29
|
+
></IgrColumn>
|
|
30
|
+
<IgrColumn
|
|
31
|
+
field="ProductName"
|
|
32
|
+
header="Product Name"
|
|
33
|
+
dataType="String"
|
|
34
|
+
></IgrColumn>
|
|
35
|
+
<IgrColumn
|
|
36
|
+
field="QuantityPerUnit"
|
|
37
|
+
header="Quantity Per Unit"
|
|
38
|
+
dataType="String"
|
|
39
|
+
></IgrColumn>
|
|
40
|
+
<IgrColumn
|
|
41
|
+
field="UnitsInStock"
|
|
42
|
+
header="Units In Stock"
|
|
43
|
+
dataType="Number"
|
|
44
|
+
></IgrColumn>
|
|
45
|
+
<IgrColumn
|
|
46
|
+
field="OrderDate"
|
|
47
|
+
header="Order Date"
|
|
48
|
+
dataType="Date"
|
|
49
|
+
></IgrColumn>
|
|
50
|
+
</IgrGrid>
|
|
51
|
+
</div>
|
|
52
|
+
<div className={style.grid}>
|
|
53
|
+
<IgrGrid autoGenerate="true" data={data} />
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
@@ -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,17 @@
|
|
|
1
|
+
:local(.container) {
|
|
2
|
+
padding-top: 24px;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-flow: column;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
align-items: center;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:local(.title) {
|
|
10
|
+
color: rgb(0, 153, 255);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:local(.grid) {
|
|
14
|
+
width: 80%;
|
|
15
|
+
margin-bottom: 24px;
|
|
16
|
+
border: 1px solid rgb(0, 153, 255);
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const IgniteUIForReactTemplate_1 = require("../../../../../lib/templates/IgniteUIForReactTemplate");
|
|
4
|
+
class GridTemplate extends IgniteUIForReactTemplate_1.IgniteUIForReactTemplate {
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
constructor() {
|
|
9
|
+
super(__dirname);
|
|
10
|
+
this.id = "grid";
|
|
11
|
+
this.name = "Grid";
|
|
12
|
+
this.widget = "igGrid";
|
|
13
|
+
this.description = "IgrGrid template for React";
|
|
14
|
+
this.projectType = "igr-ts";
|
|
15
|
+
this.components = ["Grid"];
|
|
16
|
+
this.controlGroup = "Data Grids";
|
|
17
|
+
// TODO: read version from igniteui-react-core in package.json
|
|
18
|
+
this.packages = ["igniteui-react-grids@18.3.0", "igniteui-react-inputs@18.3.0",
|
|
19
|
+
"igniteui-react-layouts@18.3.0"];
|
|
20
|
+
this.hasExtraConfiguration = false;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
module.exports = new GridTemplate();
|
|
@@ -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 IgrTsDataGridComponent extends cli_core_1.BaseComponent {
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
constructor() {
|
|
9
|
+
super(__dirname);
|
|
10
|
+
this.name = "Data Grid";
|
|
11
|
+
this.group = "Grids & Lists";
|
|
12
|
+
this.description = "pick from grids: basic, sorting, templating.";
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
module.exports = new IgrTsDataGridComponent();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const cli_core_1 = require("@igniteui/cli-core");
|
|
4
|
+
class IgrTsReactProjectLibrary extends cli_core_1.BaseProjectLibrary {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(__dirname);
|
|
7
|
+
this.name = "Ignite UI for React TS";
|
|
8
|
+
this.projectType = "igr-ts";
|
|
9
|
+
this.themes = ["default"];
|
|
10
|
+
const groups = require("./groups.json");
|
|
11
|
+
// tslint:disable-next-line:forin
|
|
12
|
+
for (const key in groups) {
|
|
13
|
+
this.groupDescriptions.set(key, groups[key]);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
module.exports = new IgrTsReactProjectLibrary();
|