Skip to content

Commit db88af9

Browse files
committed
fix update/ mobx-ajv-form. ;..etc
1 parent a03b391 commit db88af9

36 files changed

+1189
-738
lines changed

README.md

+2-12
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ We together using the following technologies:
3333
* [mobx](https://mobxjs.github.io/mobx/best/devtools.html) Better than redux in my opinion to maintain code
3434
* [mobx Dev Tools](https://github.com/mobxjs/mobx-react-devtools) for next generation DX (developer experience).
3535
* [ESLint](http://eslint.org) to maintain a consistent code style
36-
* [mobx-ajv-form](https://github.com/erikras/lru-memoize) best form validation AJV
36+
* [mobx-react-form](https://github.com/foxhound87/mobx-react-form) best form validation with mobx
3737
* [style-loader](https://github.com/webpack/style-loader), and [less-loader](https://github.com/webpack/less-loader) to allow import of stylesheets in plain css, sass and less,
3838
* [bootstrap v3](http://getbootstrap.com/) bootstrap + jquery CDN loaded async with https://www.npmjs.com/package/async-js
3939

@@ -61,7 +61,7 @@ see code head section in index.ejs
6161

6262
Updated new mobx + ajv-form version
6363
"mobx": "^2.5.0",
64-
"mobx-ajv-form": "^1.8.0",
64+
"react-mobx-form"
6565
6666
eslint + jsx-control-statements lint support for better tracking bug code
6767
@@ -95,16 +95,6 @@ and replace by mine (i did some little hack to make the new work with my config)
9595
>* I added ukrainien flag in material-ui-country-flags
9696
> Do unzip ./temp/material-ui-country-flags.zip to ./temp/node_modules/
9797
98-
>* Little mod to support Object.entries in mobx-react-matchmedia and update mobx v2.5:
99-
> Do unzip ./temp/mobx-react-matchmedia.zip to ./temp/node_modules/
100-
101-
>* Manual things be sure to remove:
102-
103-
./temp/node_module/mobx-ajv-form/node_module/mobx
104-
./temp/node_module/mobx-ajv-form/node_module/ajv
105-
106-
node_module folders are created improperly by mobx-ajv-form due to the new mobx version
107-
10898

10999
b) install my config with nginx for proxying all listening mysite.com:80 to localhost
110100
Our config manage cors, it's friendly Cross-domain

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "react-app-ssr-tools",
3-
"version": "1.1.2",
4-
"description": "Boilerplate and tooling for JavaScript application development with React with ssr",
5-
"repository": "simonjoom/react-app-ssr",
2+
"name": "react-app-mobx-ultimateversion",
3+
"version": "2.2.1",
4+
"description": "Boilerplate and tooling for JavaScript application development with React in multi-language",
5+
"repository": "simonjoom/react-app-mobx-ultimateversion",
66
"author": "Simon ",
77
"contributors": [
88
"Konstantin Tarkus <[email protected]> (https://tarkus.me)"
@@ -110,6 +110,7 @@
110110
"react-app": "^1.1.2"
111111
},
112112
"devDependencies": {
113+
"babel-polyfill": "^6.13.0",
113114
"eslint-loader": "^1.5.0",
114115
"history": "^3.0.0",
115116
"react": "^15.3.1",

templates/app/README.md

+2-12
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ We together using the following technologies:
3333
* [mobx](https://mobxjs.github.io/mobx/best/devtools.html) Better than redux in my opinion to maintain code
3434
* [mobx Dev Tools](https://github.com/mobxjs/mobx-react-devtools) for next generation DX (developer experience).
3535
* [ESLint](http://eslint.org) to maintain a consistent code style
36-
* [mobx-ajv-form](https://github.com/erikras/lru-memoize) best form validation AJV
36+
* [mobx-react-form](https://github.com/foxhound87/mobx-react-form) best form validation with mobx
3737
* [style-loader](https://github.com/webpack/style-loader), and [less-loader](https://github.com/webpack/less-loader) to allow import of stylesheets in plain css, sass and less,
3838
* [bootstrap v3](http://getbootstrap.com/) bootstrap + jquery CDN loaded async with https://www.npmjs.com/package/async-js
3939

@@ -61,7 +61,7 @@ see code head section in index.ejs
6161

6262
Updated new mobx + ajv-form version
6363
"mobx": "^2.5.0",
64-
"mobx-ajv-form": "^1.8.0",
64+
"react-mobx-form"
6565
6666
eslint + jsx-control-statements lint support for better tracking bug code
6767
@@ -95,16 +95,6 @@ and replace by mine (i did some little hack to make the new work with my config)
9595
>* I added ukrainien flag in material-ui-country-flags
9696
> Do unzip ./temp/material-ui-country-flags.zip to ./temp/node_modules/
9797
98-
>* Little mod to support Object.entries in mobx-react-matchmedia and update mobx v2.5:
99-
> Do unzip ./temp/mobx-react-matchmedia.zip to ./temp/node_modules/
100-
101-
>* Manual things be sure to remove:
102-
103-
./temp/node_module/mobx-ajv-form/node_module/mobx
104-
./temp/node_module/mobx-ajv-form/node_module/ajv
105-
106-
node_module folders are created improperly by mobx-ajv-form due to the new mobx version
107-
10898

10999
b) install my config with nginx for proxying all listening mysite.com:80 to localhost
110100
Our config manage cors, it's friendly Cross-domain

templates/app/assets/ajv.min.js

-6
This file was deleted.

templates/app/assets/ajv.min.js.map

-1
This file was deleted.

templates/app/assets/client.min.js

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/app/assets/hub.html

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!doctype html>
2+
<head>
3+
<title>Cross Storage Hub</title>
4+
</head>
5+
<body>
6+
<script type="text/javascript" src="./hub.min.js"></script>
7+
<script>
8+
// Limit requests to any client running on .localhost:300x
9+
CrossStorageHub.init([
10+
{origin: /:\/\/(uk\.)?skiscool.com$/, allow: ['get', 'set', 'del']},
11+
{origin: /:\/\/(ru\.)?skiscool.com$/, allow: ['get', 'set', 'del']},
12+
{origin: /:\/\/(pt\.)?skiscool.com$/, allow: ['get', 'set', 'del']},
13+
{origin: /:\/\/(fr\.)?skiscool.com$/, allow: ['get', 'set', 'del']},
14+
{origin: /:\/\/(www\.)?skiscool.eu$/, allow: ['get', 'set', 'del']},
15+
{origin: /.*localhost:300\d$/, allow: ['get', 'set', 'del']}
16+
]);
17+
</script>
18+
</body>
19+
</html>

templates/app/assets/hub.min.js

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/app/components/App/App.js

+85-85
Original file line numberDiff line numberDiff line change
@@ -21,100 +21,100 @@ import Debug from './Debug';
2121
import s from './App.css';
2222

2323
const handleThemeToggle = () => {
24-
dispatch('ui.theme.toggleTheme');
24+
dispatch('ui.theme.toggleTheme');
2525
};
2626

2727
@observer(['context', 'appstate'])
2828
class App extends Component {
29-
static propTypes = {
30-
context: PropTypes.shape({
31-
setTitle: PropTypes.func,
32-
setMeta: PropTypes.func,
33-
muiTheme: PropTypes.object.isRequired,
34-
}).isRequired,
35-
appstate: PropTypes.object.isRequired,
36-
breakpoints: PropTypes.object.isRequired,
37-
children: PropTypes.element.isRequired,
38-
error: PropTypes.object,
39-
};
29+
static propTypes = {
30+
context: PropTypes.shape({
31+
setTitle: PropTypes.func,
32+
setMeta: PropTypes.func,
33+
muiTheme: PropTypes.object.isRequired,
34+
}).isRequired,
35+
appstate: PropTypes.object.isRequired,
36+
breakpoints: PropTypes.object.isRequired,
37+
children: PropTypes.element.isRequired,
38+
error: PropTypes.object,
39+
};
4040

41-
static childContextTypes = {
42-
// insertCss: PropTypes.func.isRequired,
43-
setTitle: PropTypes.func.isRequired,
44-
setMeta: PropTypes.func.isRequired,
45-
muiTheme: PropTypes.object.isRequired,
46-
};
41+
static childContextTypes = {
42+
// insertCss: PropTypes.func.isRequired,
43+
setTitle: PropTypes.func.isRequired,
44+
setMeta: PropTypes.func.isRequired,
45+
muiTheme: PropTypes.object.isRequired,
46+
};
4747

48-
getChildContext() {
49-
const context = this.props.context;
50-
return {
51-
setTitle: context.setTitle || emptyFunction,
52-
setMeta: context.setMeta || emptyFunction,
53-
muiTheme: this.props.appstate.ui.theme.getMui(),
54-
};
55-
}
48+
getChildContext() {
49+
const context = this.props.context;
50+
return {
51+
setTitle: context.setTitle || emptyFunction,
52+
setMeta: context.setMeta || emptyFunction,
53+
muiTheme: this.props.appstate.ui.theme.getMui(),
54+
};
55+
}
5656

57-
render() {
58-
const { ui, auth } = this.props.appstate;
59-
const isDev = true;
60-
console.log(typeof window === 'object' ? 'client-side' : 'server-side');
61-
const { xs, su, mu } = this.props.breakpoints;
62-
return (
63-
<div>
64-
<AppNav
65-
open={ui.appNav.isOpen}
66-
docked={ui.appNav.isDocked}
67-
accountMenuIsOpen={ui.appBar.accountMenuIsOpen}
68-
>
69-
<Header />
70-
</AppNav>
71-
<If condition={isDev}>
72-
<DevTools position={{ bottom: 0, right: '15px' }} />
73-
</If>
57+
render() {
58+
const { ui, auth } = this.props.appstate;
59+
const isDev = true;
60+
console.log(typeof window === 'object' ? 'client-side' : 'server-side');
61+
const { xs, su, mu } = this.props.breakpoints;
62+
return (
63+
<div>
64+
<AppNav
65+
open={ui.appNav.isOpen}
66+
docked={ui.appNav.isDocked}
67+
accountMenuIsOpen={ui.appBar.accountMenuIsOpen}
68+
>
69+
<Header />
70+
</AppNav>
71+
<If condition={isDev}>
72+
<DevTools position={{ bottom: 0, right: '15px' }}/>
73+
</If>
7474

75-
<Paper
76-
zDepth={1}
77-
className={cx({ [s.su]: ui.layoutIsShifted }, { m0: xs, m1: su, m2: mu },"flex","flex-column")}
78-
>
79-
<Toggle
80-
label="Toggle Theme"
81-
defaultToggled={ui.theme.toggleThemestate}
82-
onToggle={handleThemeToggle}
83-
/>
75+
<Paper
76+
zDepth={1}
77+
className={cx({ [s.su]: ui.layoutIsShifted }, { m0: xs, m1: su, m2: mu }, "flex", "flex-column")}
78+
>
79+
<Toggle
80+
label="Toggle Theme"
81+
defaultToggled={ui.theme.toggleThemestate}
82+
onToggle={handleThemeToggle}
83+
/>
8484

85-
<AppBar
86-
accountMenuIsOpen={ui.appBar.accountMenuIsOpen}
87-
layoutIsShifted={ui.layoutIsShifted}
88-
authCheck={auth.check}
89-
user={auth.user}
90-
/>
91-
<div className={s.content}>
92-
{this.props.children}
93-
</div>
94-
<If condition={isDev}>
95-
<Debug />
96-
</If>
97-
</Paper>
98-
<Paper
99-
zDepth={1}
100-
className={cx({ [s.su]: ui.layoutIsShifted }, { m0: xs, m1: su, m2: mu })}
101-
>
102-
<Feedback />
103-
</Paper>
104-
<Footer />
105-
<Snackbar
106-
open={ui.snackBar.isOpen}
107-
message={ui.snackBar.message}
108-
autoHideDuration={ui.snackBar.duration}
109-
onRequestClose={() => ui.snackBar.close()}
110-
/>
111-
<AuthModal
112-
open={ui.authModal.isOpen}
113-
showSection={ui.authModal.showSection}
114-
/>
115-
</div>
116-
);
117-
}
85+
<AppBar
86+
accountMenuIsOpen={ui.appBar.accountMenuIsOpen}
87+
layoutIsShifted={ui.layoutIsShifted}
88+
authCheck={auth.check}
89+
user={auth.user}
90+
/>
91+
<div className={s.content}>
92+
{this.props.children}
93+
</div>
94+
<If condition={isDev}>
95+
<Debug />
96+
</If>
97+
</Paper>
98+
<Paper
99+
zDepth={1}
100+
className={cx({ [s.su]: ui.layoutIsShifted }, { m0: xs, m1: su, m2: mu })}
101+
>
102+
<Feedback />
103+
</Paper>
104+
<Footer />
105+
<Snackbar
106+
open={ui.snackBar.isOpen}
107+
message={ui.snackBar.message}
108+
autoHideDuration={ui.snackBar.duration}
109+
onRequestClose={() => ui.snackBar.close()}
110+
/>
111+
<AuthModal
112+
open={ui.authModal.isOpen}
113+
showSection={ui.authModal.showSection}
114+
/>
115+
</div>
116+
);
117+
}
118118
}
119119

120120
export default App;

0 commit comments

Comments
 (0)