@panneau/core 0.4.27 → 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 +7 -7
- 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 +20 -7
- 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 +21 -8
- 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 +28 -12
- package/src/reducers/index.js +5 -2
- package/src/styles/pages/resource-index.scss +15 -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';
|
|
@@ -33,7 +33,9 @@ var styles = {
|
|
|
33
33
|
'listContainer': 'panneau-core-resource-index-listContainer',
|
|
34
34
|
'list': 'panneau-core-resource-index-list',
|
|
35
35
|
'loading': 'panneau-core-resource-index-loading',
|
|
36
|
-
'
|
|
36
|
+
'inner': 'panneau-core-resource-index-inner',
|
|
37
|
+
'middle': 'panneau-core-resource-index-middle',
|
|
38
|
+
'alone': 'panneau-core-resource-index-alone'
|
|
37
39
|
};
|
|
38
40
|
|
|
39
41
|
|
|
@@ -154,7 +156,8 @@ var ResourceIndex = function (_Component) {
|
|
|
154
156
|
|
|
155
157
|
this.setState({
|
|
156
158
|
items: items,
|
|
157
|
-
pagination: pagination
|
|
159
|
+
pagination: pagination,
|
|
160
|
+
isLoading: false
|
|
158
161
|
});
|
|
159
162
|
return;
|
|
160
163
|
}
|
|
@@ -467,13 +470,23 @@ var ResourceIndex = function (_Component) {
|
|
|
467
470
|
}, {
|
|
468
471
|
key: 'renderLoading',
|
|
469
472
|
value: function renderLoading() {
|
|
473
|
+
var _classNames6;
|
|
474
|
+
|
|
475
|
+
var items = this.state.items;
|
|
476
|
+
|
|
470
477
|
return React.createElement(
|
|
471
478
|
'div',
|
|
472
|
-
{
|
|
479
|
+
{
|
|
480
|
+
className: classNames((_classNames6 = {}, _defineProperty(_classNames6, styles.loading, true), _defineProperty(_classNames6, styles.alone, items === null), _classNames6))
|
|
481
|
+
},
|
|
473
482
|
React.createElement(
|
|
474
483
|
'div',
|
|
475
|
-
{ className: styles.
|
|
476
|
-
React.createElement(
|
|
484
|
+
{ className: styles.inner },
|
|
485
|
+
React.createElement(
|
|
486
|
+
'div',
|
|
487
|
+
{ className: styles.middle },
|
|
488
|
+
React.createElement(PulseLoader, { loading: true })
|
|
489
|
+
)
|
|
477
490
|
)
|
|
478
491
|
);
|
|
479
492
|
}
|
|
@@ -509,7 +522,7 @@ var ResourceIndex = function (_Component) {
|
|
|
509
522
|
),
|
|
510
523
|
isLoading ? this.renderLoading() : null
|
|
511
524
|
),
|
|
512
|
-
pagination !== null ? this.renderPagination() : null
|
|
525
|
+
pagination !== null && pagination.last_page > 1 ? this.renderPagination() : null
|
|
513
526
|
)
|
|
514
527
|
)
|
|
515
528
|
)
|
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
|
|
|
@@ -96,7 +96,9 @@ var styles = {
|
|
|
96
96
|
'listContainer': 'panneau-core-resource-index-listContainer',
|
|
97
97
|
'list': 'panneau-core-resource-index-list',
|
|
98
98
|
'loading': 'panneau-core-resource-index-loading',
|
|
99
|
-
'
|
|
99
|
+
'inner': 'panneau-core-resource-index-inner',
|
|
100
|
+
'middle': 'panneau-core-resource-index-middle',
|
|
101
|
+
'alone': 'panneau-core-resource-index-alone'
|
|
100
102
|
};
|
|
101
103
|
|
|
102
104
|
|
|
@@ -220,7 +222,8 @@ var ResourceIndex = function (_Component) {
|
|
|
220
222
|
|
|
221
223
|
this.setState({
|
|
222
224
|
items: items,
|
|
223
|
-
pagination: pagination
|
|
225
|
+
pagination: pagination,
|
|
226
|
+
isLoading: false
|
|
224
227
|
});
|
|
225
228
|
return;
|
|
226
229
|
}
|
|
@@ -532,13 +535,23 @@ var ResourceIndex = function (_Component) {
|
|
|
532
535
|
}, {
|
|
533
536
|
key: 'renderLoading',
|
|
534
537
|
value: function renderLoading() {
|
|
538
|
+
var _classNames6;
|
|
539
|
+
|
|
540
|
+
var items = this.state.items;
|
|
541
|
+
|
|
535
542
|
return _react2.default.createElement(
|
|
536
543
|
'div',
|
|
537
|
-
{
|
|
544
|
+
{
|
|
545
|
+
className: (0, _classnames2.default)((_classNames6 = {}, (0, _defineProperty3.default)(_classNames6, styles.loading, true), (0, _defineProperty3.default)(_classNames6, styles.alone, items === null), _classNames6))
|
|
546
|
+
},
|
|
538
547
|
_react2.default.createElement(
|
|
539
548
|
'div',
|
|
540
|
-
{ className: styles.
|
|
541
|
-
_react2.default.createElement(
|
|
549
|
+
{ className: styles.inner },
|
|
550
|
+
_react2.default.createElement(
|
|
551
|
+
'div',
|
|
552
|
+
{ className: styles.middle },
|
|
553
|
+
_react2.default.createElement(_reactSpinners.PulseLoader, { loading: true })
|
|
554
|
+
)
|
|
542
555
|
)
|
|
543
556
|
);
|
|
544
557
|
}
|
|
@@ -574,7 +587,7 @@ var ResourceIndex = function (_Component) {
|
|
|
574
587
|
),
|
|
575
588
|
isLoading ? this.renderLoading() : null
|
|
576
589
|
),
|
|
577
|
-
pagination !== null ? this.renderPagination() : null
|
|
590
|
+
pagination !== null && pagination.last_page > 1 ? this.renderPagination() : null
|
|
578
591
|
)
|
|
579
592
|
)
|
|
580
593
|
)
|
|
@@ -616,7 +629,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch, _ref5) {
|
|
|
616
629
|
return {
|
|
617
630
|
getResourceActionUrl: getResourceActionUrl,
|
|
618
631
|
gotoResourceAction: function gotoResourceAction(resource, action, id) {
|
|
619
|
-
return dispatch((0,
|
|
632
|
+
return dispatch((0, _connectedReactRouter.push)(getResourceActionUrl(resource, action, id)));
|
|
620
633
|
}
|
|
621
634
|
};
|
|
622
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';
|
|
@@ -127,6 +127,7 @@ class ResourceIndex extends Component {
|
|
|
127
127
|
this.setState({
|
|
128
128
|
items,
|
|
129
129
|
pagination,
|
|
130
|
+
isLoading: false,
|
|
130
131
|
});
|
|
131
132
|
return;
|
|
132
133
|
}
|
|
@@ -204,12 +205,13 @@ class ResourceIndex extends Component {
|
|
|
204
205
|
const { resource, intl, confirmDeleteMessage } = this.props;
|
|
205
206
|
const { name } = resource;
|
|
206
207
|
const confirmMessage = get(resource, 'messages.confirm_delete', confirmDeleteMessage);
|
|
207
|
-
const message =
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
208
|
+
const message =
|
|
209
|
+
isObject(confirmMessage) && typeof confirmMessage.id !== 'undefined'
|
|
210
|
+
? intl.formatMessage(confirmMessage, {
|
|
211
|
+
name,
|
|
212
|
+
id,
|
|
213
|
+
})
|
|
214
|
+
: confirmMessage;
|
|
213
215
|
// eslint-disable-next-line no-alert
|
|
214
216
|
if (window.confirm(message)) {
|
|
215
217
|
resource.api.destroy(id).then(this.onItemDeleted);
|
|
@@ -396,10 +398,18 @@ class ResourceIndex extends Component {
|
|
|
396
398
|
|
|
397
399
|
// eslint-disable-next-line class-methods-use-this
|
|
398
400
|
renderLoading() {
|
|
401
|
+
const { items } = this.state;
|
|
399
402
|
return (
|
|
400
|
-
<div
|
|
401
|
-
|
|
402
|
-
|
|
403
|
+
<div
|
|
404
|
+
className={classNames({
|
|
405
|
+
[styles.loading]: true,
|
|
406
|
+
[styles.alone]: items === null,
|
|
407
|
+
})}
|
|
408
|
+
>
|
|
409
|
+
<div className={styles.inner}>
|
|
410
|
+
<div className={styles.middle}>
|
|
411
|
+
<PulseLoader loading />
|
|
412
|
+
</div>
|
|
403
413
|
</div>
|
|
404
414
|
</div>
|
|
405
415
|
);
|
|
@@ -422,7 +432,9 @@ class ResourceIndex extends Component {
|
|
|
422
432
|
</div>
|
|
423
433
|
{isLoading ? this.renderLoading() : null}
|
|
424
434
|
</div>
|
|
425
|
-
{pagination !== null
|
|
435
|
+
{pagination !== null && pagination.last_page > 1
|
|
436
|
+
? this.renderPagination()
|
|
437
|
+
: null}
|
|
426
438
|
</div>
|
|
427
439
|
</div>
|
|
428
440
|
</div>
|
|
@@ -475,7 +487,11 @@ const mergeProps = (
|
|
|
475
487
|
gotoResourceAction: (action, id) => gotoResourceAction(stateProps.resource, action, id),
|
|
476
488
|
});
|
|
477
489
|
|
|
478
|
-
const WithStateComponent = connect(
|
|
490
|
+
const WithStateComponent = connect(
|
|
491
|
+
mapStateToProps,
|
|
492
|
+
mapDispatchToProps,
|
|
493
|
+
mergeProps,
|
|
494
|
+
)(ResourceIndex);
|
|
479
495
|
const WithRouterContainer = withRouter(WithStateComponent);
|
|
480
496
|
const WithListsCollectionContainer = withListsCollection()(WithRouterContainer);
|
|
481
497
|
const WithUrlGeneratorContainer = withUrlGenerator()(WithListsCollectionContainer);
|
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
|
};
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
|
|
20
20
|
.listContainer {
|
|
21
21
|
position: relative;
|
|
22
|
-
min-height: 50px;
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
.list {
|
|
@@ -28,7 +27,7 @@
|
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
.loading {
|
|
31
|
-
display:
|
|
30
|
+
display: block;
|
|
32
31
|
position: absolute;
|
|
33
32
|
top: 0;
|
|
34
33
|
left: 0;
|
|
@@ -37,10 +36,24 @@
|
|
|
37
36
|
background: rgba(255, 255, 255, .5);
|
|
38
37
|
z-index: 2;
|
|
39
38
|
|
|
39
|
+
.inner {
|
|
40
|
+
display: table;
|
|
41
|
+
position: absolute;
|
|
42
|
+
top: 0;
|
|
43
|
+
left: 0;
|
|
44
|
+
width: 100%;
|
|
45
|
+
height: 100%;
|
|
46
|
+
}
|
|
47
|
+
|
|
40
48
|
.middle {
|
|
41
49
|
display: table-cell;
|
|
42
50
|
text-align: center;
|
|
43
51
|
vertical-align: middle;
|
|
44
52
|
}
|
|
53
|
+
|
|
54
|
+
&.alone {
|
|
55
|
+
position: relative;
|
|
56
|
+
height: 100px;
|
|
57
|
+
}
|
|
45
58
|
}
|
|
46
59
|
}
|