Skip to content

Commit feb7638

Browse files
Files added.
1 parent b3634d7 commit feb7638

12 files changed

+490
-2
lines changed

.gitignore

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# See https://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
6+
# testing
7+
/coverage
8+
9+
# production
10+
/build
11+
12+
# misc
13+
.DS_Store
14+
.env.local
15+
.env.development.local
16+
.env.test.local
17+
.env.production.local
18+
19+
npm-debug.log*
20+
yarn-debug.log*
21+
yarn-error.log*
22+
23+
# e2e
24+
/e2e/*.js
25+
/e2e/**/*.js
26+
/e2e/*.map
27+
28+
# e2e image capturing
29+
30+
/e2e/actual/**/*.png
31+
/e2e/diff/**/*.png
32+
33+
# automation files
34+
35+
/output
36+
output.zip
37+
output.7z
38+
test-report.html

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
1-
# getting-started-with-the-react-scheduler
2-
A quick start react project that helps you to create a simple React Scheduler of Syncfusion, with data being populated from an external JSON file.
1+
# EJ2 React
2+
3+
> Customer reported bugs automation in React platform.
4+
5+
## Test Setup
6+
7+
``` bash
8+
# install dependencies
9+
npm install
10+
11+
# serve with hot reload at localhost:3000
12+
npm start
13+
```

package.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "ej2-react",
3+
"version": "1.0.0",
4+
"description": "ej2 schedule react project",
5+
"private": true,
6+
"dependencies": {
7+
"@syncfusion/ej2-react-calendars": "^17.3.1",
8+
"@syncfusion/ej2-react-dropdowns": "^17.2.37",
9+
"@syncfusion/ej2-react-schedule": "*"
10+
},
11+
"devDependencies": {
12+
"@types/jasmine": "^2.5.54",
13+
"@types/node": "10.12.11",
14+
"@types/react": "16.7.10",
15+
"@types/react-dom": "16.0.11",
16+
"@types/react-router-dom": "*",
17+
"dotenv": "^6.1.0",
18+
"react": "^16.6.3",
19+
"react-dom": "^16.6.3",
20+
"react-router-dom": "^4.2.2",
21+
"react-scripts": "2.1.1",
22+
"react-scripts-ts": "2.16.0",
23+
"typescript": "3.2.1"
24+
},
25+
"scripts": {
26+
"start": "react-scripts-ts start",
27+
"build": "react-scripts-ts build"
28+
}
29+
}

public/favicon.ico

3.78 KB
Binary file not shown.

public/index.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7+
<meta name="theme-color" content="#000000">
8+
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
9+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" />
10+
<link href="//cdn.syncfusion.com/ej2/ej2-base/styles/material.css" rel="stylesheet" />
11+
<link href="//cdn.syncfusion.com/ej2/ej2-react-buttons/styles/material.css" rel="stylesheet" />
12+
<link href="//cdn.syncfusion.com/ej2/ej2-react-calendars/styles/material.css" rel="stylesheet" />
13+
<link href="//cdn.syncfusion.com/ej2/ej2-react-dropdowns/styles/material.css" rel="stylesheet" />
14+
<link href="//cdn.syncfusion.com/ej2/ej2-react-inputs/styles/material.css" rel="stylesheet" />
15+
<link href="//cdn.syncfusion.com/ej2/ej2-react-navigations/styles/material.css" rel="stylesheet" />
16+
<link href="//cdn.syncfusion.com/ej2/ej2-react-popups/styles/material.css" rel="stylesheet" />
17+
<link href="//cdn.syncfusion.com/ej2/ej2-react-schedule/styles/material.css" rel="stylesheet" />
18+
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
19+
<title>EJ2 React Scheduler</title>
20+
</head>
21+
22+
<body>
23+
<noscript>You need to enable JavaScript to run this app.</noscript>
24+
<div id="root"></div>
25+
</body>
26+
27+
</html>

src/App.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
body {
3+
margin: 8px;
4+
}

src/App.tsx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import * as React from 'react';
2+
import './App.css';
3+
import * as DataSource from './datasource.json';
4+
5+
import { Inject, ScheduleComponent, Day, Week, WorkWeek, Month, Agenda,
6+
EventSettingsModel } from '@syncfusion/ej2-react-schedule';
7+
8+
class App extends React.Component {
9+
private localData: EventSettingsModel = {
10+
// dataSource: [{
11+
// EndTime: new Date(2019, 0, 11, 6, 30),
12+
// StartTime: new Date(2019, 0, 11, 4, 0),
13+
// Subject: 'Testing',
14+
// IsAllDay: true,
15+
// RecurrenceRule: 'FREQ=DAILY;INTERVAL=1;COUNT=10'
16+
// }],
17+
dataSource: DataSource.scheduleData,
18+
fields: {
19+
id: "Id",
20+
subject: { name: 'Subject' },
21+
startTime: { name: 'StartTime' },
22+
endTime: { name: 'EndTime' },
23+
location: { name: 'Location' }
24+
}
25+
};
26+
public render() {
27+
return <ScheduleComponent currentView='Month' selectedDate={new Date(2019, 0, 6)}
28+
eventSettings={ this.localData }>
29+
<Inject services={[Day, Week, WorkWeek, Month, Agenda]} />
30+
</ScheduleComponent>
31+
}
32+
};
33+
export default App;

src/datasource.json

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
{
2+
"scheduleData": [{
3+
"Id": 1,
4+
"Subject": "Explosion of Betelgeuse Star",
5+
"Location": "Space Centre USA",
6+
"StartTime": "2019-01-06T04:00:00.000Z",
7+
"EndTime": "2019-01-06T05:30:00.000Z",
8+
"CategoryColor": "#1aaa55"
9+
}, {
10+
"Id": 2,
11+
"Subject": "Thule Air Crash Report",
12+
"Location": "Newyork City",
13+
"StartTime": "2019-01-07T06:30:00.000Z",
14+
"EndTime": "2019-01-07T08:30:00.000Z",
15+
"CategoryColor": "#357cd2"
16+
}, {
17+
"Id": 3,
18+
"Subject": "Blue Moon Eclipse",
19+
"Location": "Space Centre USA",
20+
"StartTime": "2019-01-08T04:00:00.000Z",
21+
"EndTime": "2019-01-08T05:30:00.000Z",
22+
"CategoryColor": "#7fa900"
23+
}, {
24+
"Id": 4,
25+
"Subject": "Meteor Showers in 2018",
26+
"Location": "Space Centre USA",
27+
"StartTime": "2019-01-09T07:30:00.000Z",
28+
"EndTime": "2019-01-09T09:00:00.000Z",
29+
"CategoryColor": "#ea7a57"
30+
}, {
31+
"Id": 5,
32+
"Subject": "Milky Way as Melting pot",
33+
"Location": "Space Centre USA",
34+
"StartTime": "2019-01-10T06:30:00.000Z",
35+
"EndTime": "2019-01-10T08:30:00.000Z",
36+
"CategoryColor": "#00bdae"
37+
}, {
38+
"Id": 6,
39+
"Subject": "Mysteries of Bermuda Triangle",
40+
"Location": "Bermuda",
41+
"StartTime": "2019-01-10T04:00:00.000Z",
42+
"EndTime": "2019-01-10T05:30:00.000Z",
43+
"CategoryColor": "#f57f17"
44+
}, {
45+
"Id": 7,
46+
"Subject": "Glaciers and Snowflakes",
47+
"Location": "Himalayas",
48+
"StartTime": "2019-01-11T05:30:00.000Z",
49+
"EndTime": "2019-01-11T07:00:00.000Z",
50+
"CategoryColor": "#1aaa55"
51+
}, {
52+
"Id": 8,
53+
"Subject": "Life on Mars",
54+
"Location": "Space Centre USA",
55+
"StartTime": "2019-01-12T03:30:00.000Z",
56+
"EndTime": "2019-01-12T04:30:00.000Z",
57+
"CategoryColor": "#357cd2"
58+
}, {
59+
"Id": 9,
60+
"Subject": "Alien Civilization",
61+
"Location": "Space Centre USA",
62+
"StartTime": "2019-01-14T05:30:00.000Z",
63+
"EndTime": "2019-01-14T07:30:00.000Z",
64+
"CategoryColor": "#7fa900"
65+
}, {
66+
"Id": 10,
67+
"Subject": "Wildlife Galleries",
68+
"Location": "Africa",
69+
"StartTime": "2019-01-16T05:30:00.000Z",
70+
"EndTime": "2019-01-16T07:30:00.000Z",
71+
"CategoryColor": "#ea7a57"
72+
}, {
73+
"Id": 11,
74+
"Subject": "Best Photography 2018",
75+
"Location": "London",
76+
"StartTime": "2019-01-17T04:00:00.000Z",
77+
"EndTime": "2019-01-17T05:30:00.000Z",
78+
"CategoryColor": "#00bdae"
79+
}, {
80+
"Id": 12,
81+
"Subject": "Smarter Puppies",
82+
"Location": "Sweden",
83+
"StartTime": "2019-01-04T04:30:00.000Z",
84+
"EndTime": "2019-01-04T06:00:00.000Z",
85+
"CategoryColor": "#f57f17"
86+
}, {
87+
"Id": 13,
88+
"Subject": "Myths of Andromeda Galaxy",
89+
"Location": "Space Centre USA",
90+
"StartTime": "2019-01-02T05:00:00.000Z",
91+
"EndTime": "2019-01-02T07:00:00.000Z",
92+
"CategoryColor": "#1aaa55"
93+
}, {
94+
"Id": 14,
95+
"Subject": "Aliens vs Humans",
96+
"Location": "Research Centre of USA",
97+
"StartTime": "2019-01-01T04:30:00.000Z",
98+
"EndTime": "2019-01-01T06:00:00.000Z",
99+
"CategoryColor": "#357cd2"
100+
}, {
101+
"Id": 15,
102+
"Subject": "Facts of Humming Birds",
103+
"Location": "California",
104+
"StartTime": "2019-01-15T04:00:00.000Z",
105+
"EndTime": "2019-01-15T05:30:00.000Z",
106+
"CategoryColor": "#7fa900"
107+
}, {
108+
"Id": 16,
109+
"Subject": "Sky Gazers",
110+
"Location": "Alaska",
111+
"StartTime": "2019-01-18T05:30:00.000Z",
112+
"EndTime": "2019-01-18T07:30:00.000Z",
113+
"CategoryColor": "#ea7a57"
114+
}, {
115+
"Id": 17,
116+
"Subject": "The Cycle of Seasons",
117+
"Location": "Research Centre of USA",
118+
"StartTime": "2019-01-07T00:00:00.000Z",
119+
"EndTime": "2019-01-07T02:00:00.000Z",
120+
"CategoryColor": "#00bdae"
121+
}, {
122+
"Id": 18,
123+
"Subject": "Space Galaxies and Planets",
124+
"Location": "Space Centre USA",
125+
"StartTime": "2019-01-07T11:30:00.000Z",
126+
"EndTime": "2019-01-07T13:00:00.000Z",
127+
"CategoryColor": "#f57f17"
128+
}, {
129+
"Id": 19,
130+
"Subject": "Lifecycle of Bumblebee",
131+
"Location": "San Fransisco",
132+
"StartTime": "2019-01-10T00:30:00.000Z",
133+
"EndTime": "2019-01-10T02:00:00.000Z",
134+
"CategoryColor": "#7fa900"
135+
}, {
136+
"Id": 20,
137+
"Subject": "Alien Civilization",
138+
"Location": "Space Centre USA",
139+
"StartTime": "2019-01-10T10:30:00.000Z",
140+
"EndTime": "2019-01-10T12:30:00.000Z",
141+
"CategoryColor": "#ea7a57"
142+
}, {
143+
"Id": 21,
144+
"Subject": "Alien Civilization",
145+
"Location": "Space Centre USA",
146+
"StartTime": "2019-01-06T08:30:00.000Z",
147+
"EndTime": "2019-01-06T10:30:00.000Z",
148+
"CategoryColor": "#ea7a57"
149+
}, {
150+
"Id": 22,
151+
"Subject": "The Cycle of Seasons",
152+
"Location": "Research Centre of USA",
153+
"StartTime": "2019-01-08T09:00:00.000Z",
154+
"EndTime": "2019-01-08T10:30:00.000Z",
155+
"CategoryColor": "#00bdae"
156+
}, {
157+
"Id": 23,
158+
"Subject": "Sky Gazers",
159+
"Location": "Greenland",
160+
"StartTime": "2019-01-11T09:00:00.000Z",
161+
"EndTime": "2019-01-11T10:30:00.000Z",
162+
"CategoryColor": "#ea7a57"
163+
}, {
164+
"Id": 24,
165+
"Subject": "Facts of Humming Birds",
166+
"Location": "California",
167+
"StartTime": "2019-01-12T07:00:00.000Z",
168+
"EndTime": "2019-01-12T09:00:00.000Z",
169+
"CategoryColor": "#7fa900"
170+
}]
171+
}

src/index.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import * as React from "react";
2+
import * as ReactDOM from "react-dom";
3+
import App from "./App";
4+
import reactConfiguration from "./react-config";
5+
6+
ReactDOM.render(<App />, document.getElementById("root") as HTMLElement);
7+
reactConfiguration();

0 commit comments

Comments
 (0)