Skip to content

Commit 5e9a5ab

Browse files
committed
initial commit
1 parent 4dc5130 commit 5e9a5ab

File tree

18 files changed

+885
-0
lines changed

18 files changed

+885
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!DOCTYPE html>
2+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
3+
<head>
4+
<title>DevExtreme Demo</title>
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0" />
8+
<link rel="stylesheet" type="text/css" href="../../../../../node_modules/devextreme/dist/css/dx.light.css" />
9+
10+
<script src="../../../../../node_modules/core-js/client/shim.min.js"></script>
11+
<script src="../../../../../node_modules/zone.js/dist/zone.js"></script>
12+
<script src="../../../../../node_modules/reflect-metadata/Reflect.js"></script>
13+
<script src="../../../../../node_modules/systemjs/dist/system.js"></script>
14+
15+
<script src="config.js"></script>
16+
<script>
17+
System.import("app").catch(console.error.bind(console));
18+
</script>
19+
</head>
20+
21+
<body class="dx-viewport">
22+
<div class="demo-container">
23+
<demo-app>Loading...</demo-app>
24+
</div>
25+
</body>
26+
</html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import React from "react";
2+
import "devextreme/dist/css/dx.fluent.blue.light.css";
3+
import { CardView, Paging } from "devextreme-react/card-view";
4+
import { employees } from "./data";
5+
6+
const App = () => {
7+
const calculateFullName = (data) => `${data.FirstName} ${data.LastName}`;
8+
const imageExpr = (data) => `https://js.devexpress.com/jQuery/Demos/WidgetsGallery/JSDemos/${data.Picture}`;
9+
10+
return (
11+
<CardView
12+
id="cardview"
13+
dataSource={employees}
14+
keyExpr="ID"
15+
columns={[
16+
{ dataField: "Full Name", calculateCellValue: calculateFullName },
17+
{ dataField: "Prefix" },
18+
{ dataField: "Position" },
19+
{ dataField: "BirthDate" },
20+
{ dataField: "HireDate" },
21+
{ dataField: "Address" }
22+
]}
23+
cardCover={{ imageExpr, altExpr: "FullName" }}
24+
pager={{
25+
allowedPageSizes: [5, 8, 15, 30],
26+
showInfo: true,
27+
showNavigationButtons: true,
28+
showPageSizeSelector: true,
29+
visible: true
30+
}}
31+
>
32+
<Paging pageSize={5} />
33+
</CardView>
34+
);
35+
};
36+
37+
export default App;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
export const employees = [
2+
{
3+
ID: 1,
4+
FirstName: "John",
5+
LastName: "Heart",
6+
Prefix: "Mr.",
7+
Position: "CEO",
8+
Picture: "/images/employees/01.png",
9+
BirthDate: "1964/03/16",
10+
HireDate: "1995/01/15",
11+
Notes:
12+
"John has been in the Audio/Video industry since 1990. He has led DevAv as its CEO since 2003.\r\n\r\nWhen not working hard as the CEO, John loves to golf and bowl. He once bowled a perfect game of 300.",
13+
Address: "351 S Hill St.",
14+
State: "California",
15+
City: "Los Angeles",
16+
},
17+
{
18+
ID: 2,
19+
FirstName: "Olivia",
20+
LastName: "Peyton",
21+
Prefix: "Mrs.",
22+
Position: "Sales Assistant",
23+
Picture: "/images/employees/09.png",
24+
BirthDate: "1981/06/03",
25+
HireDate: "2012/05/14",
26+
Notes: "Olivia loves to sell. She has been selling DevAV products since 2012. \r\n\r\nOlivia was homecoming queen in high school. She is expecting her first child in 6 months. Good Luck Olivia.",
27+
Address: "807 W Paseo Del Mar",
28+
State: "California",
29+
City: "Los Angeles",
30+
},
31+
{
32+
ID: 3,
33+
FirstName: "Robert",
34+
LastName: "Reagan",
35+
Prefix: "Mr.",
36+
Position: "CMO",
37+
Picture: "/images/employees/03.png",
38+
BirthDate: "1974/09/07",
39+
HireDate: "2002/11/08",
40+
Notes:
41+
"Robert was recently voted the CMO of the year by CMO Magazine. He is a proud member of the DevAV Management Team.\r\n\r\nRobert is a championship BBQ chef, so when you get the chance ask him for his secret recipe.",
42+
Address: "4 Westmoreland Pl.",
43+
State: "Arkansas",
44+
City: "Bentonville",
45+
},
46+
{
47+
ID: 4,
48+
FirstName: "Greta",
49+
LastName: "Sims",
50+
Prefix: "Ms.",
51+
Position: "HR Manager",
52+
Picture: "/images/employees/04.png",
53+
BirthDate: "1977/11/22",
54+
HireDate: "1998/04/23",
55+
Notes: "Greta has been DevAV's HR Manager since 2003. She joined DevAV from Sonee Corp.\r\n\r\nGreta is currently training for the NYC marathon. Her best marathon time is 4 hours. Go Greta.",
56+
Address: "1700 S Grandview Dr.",
57+
State: "Georgia",
58+
City: "Atlanta",
59+
},
60+
{
61+
ID: 5,
62+
FirstName: "Brett",
63+
LastName: "Wade",
64+
Prefix: "Mr.",
65+
Position: "IT Manager",
66+
Picture: "/images/employees/05.png",
67+
BirthDate: "1968/12/01",
68+
HireDate: "2009/03/06",
69+
Notes: "Brett came to DevAv from Microsoft and has led our IT department since 2012.\r\n\r\nWhen he is not working hard for DevAV, he coaches Little League (he was a high school pitcher).",
70+
Address: "1120 Old Mill Rd.",
71+
State: "Idaho",
72+
City: "Boise",
73+
},
74+
{
75+
ID: 6,
76+
FirstName: "Sandra",
77+
LastName: "Johnson",
78+
Prefix: "Mrs.",
79+
Position: "Controller",
80+
Picture: "/images/employees/06.png",
81+
BirthDate: "1974/11/15",
82+
HireDate: "2005/05/11",
83+
Notes:
84+
"Sandra is a CPA and has been our controller since 2008. She loves to interact with staff so if you've not met her, be certain to say hi.\r\n\r\nSandra has 2 daughters both of whom are accomplished gymnasts.",
85+
Address: "4600 N Virginia Rd.",
86+
State: "Utah",
87+
City: "Beaver",
88+
},
89+
{
90+
ID: 7,
91+
FirstName: "Kevin",
92+
LastName: "Carter",
93+
Prefix: "Mr.",
94+
Position: "Shipping Manager",
95+
Picture: "/images/employees/07.png",
96+
BirthDate: "1978/01/09",
97+
HireDate: "2009/08/11",
98+
Notes:
99+
"Kevin is our hard-working shipping manager and has been helping that department work like clockwork for 18 months.\r\n\r\nWhen not in the office, he is usually on the basketball court playing pick-up games.",
100+
Address: "424 N Main St.",
101+
State: "California",
102+
City: "San Diego",
103+
},
104+
{
105+
ID: 8,
106+
FirstName: "Cynthia",
107+
LastName: "Stanwick",
108+
Prefix: "Ms.",
109+
Position: "HR Assistant",
110+
Picture: "/images/employees/08.png",
111+
BirthDate: "1985/06/05",
112+
HireDate: "2008/03/24",
113+
Notes: "Cindy joined us in 2008 and has been in the HR department for 2 years. \r\n\r\nShe was recently awarded employee of the month. Way to go Cindy!",
114+
Address: "2211 Bonita Dr.",
115+
State: "Arkansas",
116+
City: "Little Rock",
117+
},
118+
{
119+
ID: 9,
120+
FirstName: "Kent",
121+
LastName: "Samuelson",
122+
Prefix: "Dr.",
123+
Position: "Ombudsman",
124+
Picture: "/images/employees/02.png",
125+
BirthDate: "1972/09/11",
126+
HireDate: "2009/04/22",
127+
Notes:
128+
"As our ombudsman, Kent is on the front-lines solving customer problems and helping our partners address issues out in the field. He is a classically trained musician and is a member of the Chamber Orchestra.",
129+
Address: "12100 Mora Dr",
130+
State: "Missouri",
131+
City: "St. Louis",
132+
},
133+
{
134+
ID: 10,
135+
FirstName: "Taylor",
136+
LastName: "Riley",
137+
Prefix: "Mr.",
138+
Position: "Network Admin",
139+
Picture: "",
140+
BirthDate: "1982/08/14",
141+
HireDate: "2012/04/14",
142+
Notes: "If you are like the rest of us at DevAV, then you've probably reached out for help from Taylor. He does a great job as a member of our IT department.",
143+
Address: "7776 Torreyson Dr",
144+
State: "California",
145+
City: "San Jose",
146+
},
147+
];
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>DevExtreme Demo</title>
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0" />
8+
<link rel="stylesheet" type="text/css" href="../../../../../node_modules/devextreme/dist/css/dx.fluent.blue.light.css" />
9+
10+
<script src="../../../../../node_modules/core-js/client/shim.min.js"></script>
11+
<script src="../../../../../node_modules/systemjs/dist/system.js"></script>
12+
<script type="text/javascript" src="config.js"></script>
13+
<script type="text/javascript">
14+
System.import("./index.tsx");
15+
</script>
16+
</head>
17+
18+
<body class="dx-viewport">
19+
<div class="demo-container">
20+
<div id="app"></div>
21+
</div>
22+
</body>
23+
</html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from 'react';
2+
import ReactDOM from 'react-dom';
3+
4+
import App from './App.tsx';
5+
6+
ReactDOM.render(
7+
<App />,
8+
document.getElementById('app'),
9+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import React from "react";
2+
import "devextreme/dist/css/dx.fluent.blue.light.css";
3+
import { CardView, Paging } from "devextreme-react/card-view";
4+
import { employees } from "./data";
5+
6+
const App = () => {
7+
const calculateFullName = (data) => `${data.FirstName} ${data.LastName}`;
8+
const imageExpr = (data) => `https://js.devexpress.com/jQuery/Demos/WidgetsGallery/JSDemos/${data.Picture}`;
9+
10+
return (
11+
<CardView
12+
id="cardview"
13+
dataSource={employees}
14+
keyExpr="ID"
15+
columns={[
16+
{ dataField: "Full Name", calculateCellValue: calculateFullName },
17+
{ dataField: "Prefix" },
18+
{ dataField: "Position" },
19+
{ dataField: "BirthDate" },
20+
{ dataField: "HireDate" },
21+
{ dataField: "Address" }
22+
]}
23+
cardCover={{ imageExpr, altExpr: "FullName" }}
24+
pager={{
25+
allowedPageSizes: [5, 8, 15, 30],
26+
showInfo: true,
27+
showNavigationButtons: true,
28+
showPageSizeSelector: true,
29+
visible: true
30+
}}
31+
>
32+
<Paging pageSize={5} />
33+
</CardView>
34+
);
35+
};
36+
37+
export default App;

0 commit comments

Comments
 (0)