forked from surveyjs/surveyjs_react_quickstart
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
117 lines (106 loc) · 3.6 KB
/
App.js
File metadata and controls
117 lines (106 loc) · 3.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
import { BrowserRouter as Router, Switch, Route, Link } from "react-router-dom";
import "./App.css";
import { HomePage } from "./pages/Home";
import { CreatorPage } from "./pages/Creator";
import { SurveyPage } from "./pages/Survey";
import { ExportToPDFPage } from "./pages/Export";
import { AnalyticsPage } from "./pages/Analytics";
import { AnalyticsTabulatorPage } from "./pages/AnalyticsTabulator";
import { AnalyticsDatatablesPage } from "./pages/AnalyticsDatatables";
import "bootstrap/dist/css/bootstrap.css";
import * as Survey from "survey-core";
import $ from "jquery";
export { MyQuestion } from "./components/MyQuestion";
import "jquery-ui/themes/base/all.css";
import "nouislider/distribute/nouislider.css";
import "select2/dist/css/select2.css";
import "bootstrap-slider/dist/css/bootstrap-slider.css";
import "jquery-bar-rating/dist/themes/css-stars.css";
import "jquery-bar-rating/dist/themes/fontawesome-stars.css";
import "pretty-checkbox/dist/pretty-checkbox.css";
import "select2/dist/js/select2.js";
import "jquery-bar-rating";
// import "icheck/skins/square/blue.css";
// require("icheck");
import * as widgets from "surveyjs-widgets";
window["$"] = window["jQuery"] = $;
require("jquery-ui/ui/widgets/datepicker.js");
widgets.prettycheckbox(Survey);
widgets.select2(Survey, $);
widgets.inputmask(Survey);
widgets.jquerybarrating(Survey, $);
widgets.jqueryuidatepicker(Survey, $);
widgets.nouislider(Survey);
widgets.select2tagbox(Survey, $);
widgets.sortablejs(Survey);
widgets.ckeditor(Survey);
widgets.autocomplete(Survey, $);
widgets.bootstrapslider(Survey);
// widgets.icheck(Survey, $);
export default function SurveyJSReactApplication() {
return (
<Router>
<div>
<nav className="navbar navbar-default">
<div className="container-fluid">
<div className="navbar-header">
<a className="navbar-brand" href="/">
SurveyJS + React
</a>
</div>
<ul className="nav navbar-nav">
<li>
<Link to="/">Home</Link>
</li>
<li>
<Link to="/survey">Survey</Link>
</li>
<li>
<Link to="/creator">Survey Creator</Link>
</li>
<li>
<Link to="/export">PDF Export</Link>
</li>
<li>
<Link to="/analytics">Analytics</Link>
</li>
<li>
<Link to="/analyticstabulator">Results Table</Link>
</li>
<li>
<Link to="/analyticsdatatables">
Results Table (IE Support)
</Link>
</li>
</ul>
</div>
</nav>
<div className="app-content">
<Switch>
<Route exact path="/">
<HomePage />
</Route>
<Route path="/survey">
<SurveyPage />
</Route>
<Route path="/creator">
<CreatorPage />
</Route>
<Route path="/export">
<ExportToPDFPage />
</Route>
<Route path="/analytics">
<AnalyticsPage />
</Route>
<Route path="/analyticsdatatables">
<AnalyticsDatatablesPage />
</Route>
<Route path="/analyticstabulator">
<AnalyticsTabulatorPage />
</Route>
</Switch>
</div>
</div>
</Router>
);
}