@panneau/core 0.4.38 → 0.4.40
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/dist/panneau.css +6 -6
- package/dist/panneau.js +1 -1
- package/es/components/Layout.js +1 -1
- package/es/components/pages/ResourceCreate.js +1 -1
- package/es/components/pages/ResourceForm.js +2 -2
- package/es/components/pages/ResourceIndex.js +1 -1
- package/es/reducers/index.js +5 -2
- package/lib/components/Layout.js +3 -3
- package/lib/components/pages/ResourceCreate.js +2 -2
- package/lib/components/pages/ResourceForm.js +3 -3
- package/lib/components/pages/ResourceIndex.js +2 -2
- package/lib/reducers/index.js +7 -2
- package/package.json +5 -5
- package/src/components/Layout.jsx +1 -1
- package/src/components/pages/ResourceCreate.jsx +1 -1
- package/src/components/pages/ResourceForm.jsx +2 -2
- package/src/components/pages/ResourceIndex.jsx +1 -1
- package/src/reducers/index.js +5 -2
package/es/components/Layout.js
CHANGED
|
@@ -3,7 +3,7 @@ import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutPropert
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import get from 'lodash/get';
|
|
5
5
|
import { connect } from 'react-redux';
|
|
6
|
-
import { push } from 'react-router
|
|
6
|
+
import { push } from 'connected-react-router';
|
|
7
7
|
import { withUrlGenerator } from '@folklore/react-app';
|
|
8
8
|
|
|
9
9
|
import * as PanneauPropTypes from '../lib/PropTypes';
|
|
@@ -7,7 +7,7 @@ import _inherits from 'babel-runtime/helpers/inherits';
|
|
|
7
7
|
import React, { Component } from 'react';
|
|
8
8
|
import { defineMessages } from 'react-intl';
|
|
9
9
|
import { withRouter } from 'react-router';
|
|
10
|
-
import { push } from 'react-router
|
|
10
|
+
import { push } from 'connected-react-router';
|
|
11
11
|
import { connect } from 'react-redux';
|
|
12
12
|
import PropTypes from 'prop-types';
|
|
13
13
|
import get from 'lodash/get';
|
|
@@ -12,7 +12,7 @@ import { connect } from 'react-redux';
|
|
|
12
12
|
import get from 'lodash/get';
|
|
13
13
|
import isObject from 'lodash/isObject';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
|
-
import { push } from 'react-router
|
|
15
|
+
import { push } from 'connected-react-router';
|
|
16
16
|
import { withUrlGenerator } from '@folklore/react-app';
|
|
17
17
|
import { defineMessages, FormattedMessage } from 'react-intl';
|
|
18
18
|
import { PulseLoader } from 'react-spinners';
|
|
@@ -60,7 +60,7 @@ var propTypes = {
|
|
|
60
60
|
}).isRequired,
|
|
61
61
|
location: PropTypes.shape({
|
|
62
62
|
search: PropTypes.string,
|
|
63
|
-
state: PropTypes.object
|
|
63
|
+
state: PropTypes.object // eslint-disable-line
|
|
64
64
|
}).isRequired,
|
|
65
65
|
title: PanneauPropTypes.message,
|
|
66
66
|
action: PropTypes.string,
|
|
@@ -10,7 +10,7 @@ import React, { Component } from 'react';
|
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import { withRouter } from 'react-router';
|
|
12
12
|
import { Link } from 'react-router-dom';
|
|
13
|
-
import { push } from 'react-router
|
|
13
|
+
import { push } from 'connected-react-router';
|
|
14
14
|
import { connect } from 'react-redux';
|
|
15
15
|
import get from 'lodash/get';
|
|
16
16
|
import isString from 'lodash/isString';
|
package/es/reducers/index.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { connectRouter } from 'connected-react-router';
|
|
2
|
+
import { createBrowserHistory } from 'history';
|
|
2
3
|
import layoutReducer from './LayoutReducer';
|
|
3
4
|
import panneauReducer from './PanneauReducer';
|
|
4
5
|
|
|
6
|
+
export var history = createBrowserHistory();
|
|
7
|
+
|
|
5
8
|
export default {
|
|
6
|
-
|
|
9
|
+
router: connectRouter(history),
|
|
7
10
|
layout: layoutReducer,
|
|
8
11
|
panneau: panneauReducer
|
|
9
12
|
};
|
package/lib/components/Layout.js
CHANGED
|
@@ -22,7 +22,7 @@ var _get2 = _interopRequireDefault(_get);
|
|
|
22
22
|
|
|
23
23
|
var _reactRedux = require('react-redux');
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _connectedReactRouter = require('connected-react-router');
|
|
26
26
|
|
|
27
27
|
var _reactApp = require('@folklore/react-app');
|
|
28
28
|
|
|
@@ -72,10 +72,10 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch, _ref3) {
|
|
|
72
72
|
var urlGenerator = _ref3.urlGenerator;
|
|
73
73
|
return {
|
|
74
74
|
gotoHome: function gotoHome() {
|
|
75
|
-
return dispatch((0,
|
|
75
|
+
return dispatch((0, _connectedReactRouter.push)(urlGenerator.route('home')));
|
|
76
76
|
},
|
|
77
77
|
goto: function goto(path) {
|
|
78
|
-
return dispatch((0,
|
|
78
|
+
return dispatch((0, _connectedReactRouter.push)(path));
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
};
|
|
@@ -36,7 +36,7 @@ var _reactIntl = require('react-intl');
|
|
|
36
36
|
|
|
37
37
|
var _reactRouter = require('react-router');
|
|
38
38
|
|
|
39
|
-
var
|
|
39
|
+
var _connectedReactRouter = require('connected-react-router');
|
|
40
40
|
|
|
41
41
|
var _reactRedux = require('react-redux');
|
|
42
42
|
|
|
@@ -132,7 +132,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch, _ref3) {
|
|
|
132
132
|
var urlGenerator = _ref3.urlGenerator;
|
|
133
133
|
return {
|
|
134
134
|
gotoResourceEdit: function gotoResourceEdit(resource, id) {
|
|
135
|
-
return dispatch((0,
|
|
135
|
+
return dispatch((0, _connectedReactRouter.push)(urlGenerator.route('resource.edit', {
|
|
136
136
|
resource: resource.id,
|
|
137
137
|
id: id
|
|
138
138
|
})));
|
|
@@ -56,7 +56,7 @@ var _classnames = require('classnames');
|
|
|
56
56
|
|
|
57
57
|
var _classnames2 = _interopRequireDefault(_classnames);
|
|
58
58
|
|
|
59
|
-
var
|
|
59
|
+
var _connectedReactRouter = require('connected-react-router');
|
|
60
60
|
|
|
61
61
|
var _reactApp = require('@folklore/react-app');
|
|
62
62
|
|
|
@@ -121,7 +121,7 @@ var propTypes = {
|
|
|
121
121
|
}).isRequired,
|
|
122
122
|
location: _propTypes2.default.shape({
|
|
123
123
|
search: _propTypes2.default.string,
|
|
124
|
-
state: _propTypes2.default.object
|
|
124
|
+
state: _propTypes2.default.object // eslint-disable-line
|
|
125
125
|
}).isRequired,
|
|
126
126
|
title: PanneauPropTypes.message,
|
|
127
127
|
action: _propTypes2.default.string,
|
|
@@ -565,7 +565,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch, _ref3) {
|
|
|
565
565
|
var urlGenerator = _ref3.urlGenerator;
|
|
566
566
|
return {
|
|
567
567
|
gotoResourceIndex: function gotoResourceIndex(resource) {
|
|
568
|
-
return dispatch((0,
|
|
568
|
+
return dispatch((0, _connectedReactRouter.push)(typeof resource.routes !== 'undefined' ? urlGenerator.route('resource.' + resource.id + '.index') : urlGenerator.route('resource.index', {
|
|
569
569
|
resource: resource.id
|
|
570
570
|
})));
|
|
571
571
|
}
|
|
@@ -44,7 +44,7 @@ var _reactRouter = require('react-router');
|
|
|
44
44
|
|
|
45
45
|
var _reactRouterDom = require('react-router-dom');
|
|
46
46
|
|
|
47
|
-
var
|
|
47
|
+
var _connectedReactRouter = require('connected-react-router');
|
|
48
48
|
|
|
49
49
|
var _reactRedux = require('react-redux');
|
|
50
50
|
|
|
@@ -629,7 +629,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch, _ref5) {
|
|
|
629
629
|
return {
|
|
630
630
|
getResourceActionUrl: getResourceActionUrl,
|
|
631
631
|
gotoResourceAction: function gotoResourceAction(resource, action, id) {
|
|
632
|
-
return dispatch((0,
|
|
632
|
+
return dispatch((0, _connectedReactRouter.push)(getResourceActionUrl(resource, action, id)));
|
|
633
633
|
}
|
|
634
634
|
};
|
|
635
635
|
};
|
package/lib/reducers/index.js
CHANGED
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.history = undefined;
|
|
6
7
|
|
|
7
|
-
var
|
|
8
|
+
var _connectedReactRouter = require('connected-react-router');
|
|
9
|
+
|
|
10
|
+
var _history = require('history');
|
|
8
11
|
|
|
9
12
|
var _LayoutReducer = require('./LayoutReducer');
|
|
10
13
|
|
|
@@ -16,8 +19,10 @@ var _PanneauReducer2 = _interopRequireDefault(_PanneauReducer);
|
|
|
16
19
|
|
|
17
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
21
|
|
|
22
|
+
var history = exports.history = (0, _history.createBrowserHistory)();
|
|
23
|
+
|
|
19
24
|
exports.default = {
|
|
20
|
-
|
|
25
|
+
router: (0, _connectedReactRouter.connectRouter)(history),
|
|
21
26
|
layout: _LayoutReducer2.default,
|
|
22
27
|
panneau: _PanneauReducer2.default
|
|
23
28
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.40",
|
|
4
4
|
"description": "Core utilities of the Panneau package",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"babel-runtime": "^6.26.0",
|
|
60
60
|
"bootstrap": "^4.1.1",
|
|
61
61
|
"classnames": "^2.2.5",
|
|
62
|
+
"connected-react-router": "^6.9.1",
|
|
62
63
|
"history": "^4.7.2",
|
|
63
64
|
"hoist-non-react-statics": "^2.3.1",
|
|
64
65
|
"invariant": "^2.2.2",
|
|
@@ -71,12 +72,10 @@
|
|
|
71
72
|
"prop-types": "^15.6.0",
|
|
72
73
|
"query-string": "^6.1.0",
|
|
73
74
|
"react-intl": "^2.4.0",
|
|
74
|
-
"react-redux": "^
|
|
75
|
+
"react-redux": "^6.0.0",
|
|
75
76
|
"react-router": "^4.2.0",
|
|
76
77
|
"react-router-dom": "^4.2.2",
|
|
77
|
-
"react-router-redux": "^5.0.0-alpha.9",
|
|
78
78
|
"react-spinners": "^0.3.2",
|
|
79
|
-
"redux": "^3.7.2",
|
|
80
79
|
"redux-promise": "^0.5.3",
|
|
81
80
|
"redux-thunk": "^2.2.0",
|
|
82
81
|
"whatwg-fetch": "^2.0.3",
|
|
@@ -91,5 +90,6 @@
|
|
|
91
90
|
"peerDependencies": {
|
|
92
91
|
"react": ">=15.0.0 || ^16.0.0",
|
|
93
92
|
"react-dom": ">=15.0.0 || ^16.0.0"
|
|
94
|
-
}
|
|
93
|
+
},
|
|
94
|
+
"gitHead": "d31ead86486ab8cfc054ec46e61e49377e43f23a"
|
|
95
95
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import get from 'lodash/get';
|
|
3
3
|
import { connect } from 'react-redux';
|
|
4
|
-
import { push } from 'react-router
|
|
4
|
+
import { push } from 'connected-react-router';
|
|
5
5
|
import { withUrlGenerator } from '@folklore/react-app';
|
|
6
6
|
|
|
7
7
|
import * as PanneauPropTypes from '../lib/PropTypes';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { defineMessages } from 'react-intl';
|
|
3
3
|
import { withRouter } from 'react-router';
|
|
4
|
-
import { push } from 'react-router
|
|
4
|
+
import { push } from 'connected-react-router';
|
|
5
5
|
import { connect } from 'react-redux';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import get from 'lodash/get';
|
|
@@ -5,7 +5,7 @@ import { connect } from 'react-redux';
|
|
|
5
5
|
import get from 'lodash/get';
|
|
6
6
|
import isObject from 'lodash/isObject';
|
|
7
7
|
import classNames from 'classnames';
|
|
8
|
-
import { push } from 'react-router
|
|
8
|
+
import { push } from 'connected-react-router';
|
|
9
9
|
import { withUrlGenerator } from '@folklore/react-app';
|
|
10
10
|
import { defineMessages, FormattedMessage } from 'react-intl';
|
|
11
11
|
import { PulseLoader } from 'react-spinners';
|
|
@@ -52,7 +52,7 @@ const propTypes = {
|
|
|
52
52
|
}).isRequired,
|
|
53
53
|
location: PropTypes.shape({
|
|
54
54
|
search: PropTypes.string,
|
|
55
|
-
state: PropTypes.object,
|
|
55
|
+
state: PropTypes.object, // eslint-disable-line
|
|
56
56
|
}).isRequired,
|
|
57
57
|
title: PanneauPropTypes.message,
|
|
58
58
|
action: PropTypes.string,
|
|
@@ -3,7 +3,7 @@ import React, { Component } from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { withRouter } from 'react-router';
|
|
5
5
|
import { Link } from 'react-router-dom';
|
|
6
|
-
import { push } from 'react-router
|
|
6
|
+
import { push } from 'connected-react-router';
|
|
7
7
|
import { connect } from 'react-redux';
|
|
8
8
|
import get from 'lodash/get';
|
|
9
9
|
import isString from 'lodash/isString';
|
package/src/reducers/index.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { connectRouter } from 'connected-react-router';
|
|
2
|
+
import { createBrowserHistory } from 'history';
|
|
2
3
|
import layoutReducer from './LayoutReducer';
|
|
3
4
|
import panneauReducer from './PanneauReducer';
|
|
4
5
|
|
|
6
|
+
export const history = createBrowserHistory();
|
|
7
|
+
|
|
5
8
|
export default {
|
|
6
|
-
|
|
9
|
+
router: connectRouter(history),
|
|
7
10
|
layout: layoutReducer,
|
|
8
11
|
panneau: panneauReducer,
|
|
9
12
|
};
|