@configuratorware/configurator-frontendgui 1.48.4 → 1.48.5
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.
|
@@ -11,10 +11,7 @@ var _Typography = _interopRequireDefault(require("@material-ui/core/Typography")
|
|
|
11
11
|
var _MainButton = _interopRequireDefault(require("../../../../../Shared/Components/MainButton"));
|
|
12
12
|
var _i18n = require("../../../../../Framework/i18n");
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
|
-
var _Actions = require("../../../../Reducers/Configurator/Actions");
|
|
15
|
-
var _reactRedux = require("react-redux");
|
|
16
14
|
var _reactRouterDom = require("react-router-dom");
|
|
17
|
-
var _Actions2 = require("../../../../Reducers/UI/Actions");
|
|
18
15
|
var _CircularProgress = _interopRequireDefault(require("@material-ui/core/CircularProgress"));
|
|
19
16
|
var _getImageUrl = _interopRequireDefault(require("../../../../Utils/getImageUrl"));
|
|
20
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -77,7 +74,6 @@ var ItemTile = function ItemTile(_ref) {
|
|
|
77
74
|
linkTo = _ref.linkTo,
|
|
78
75
|
image = _ref.image;
|
|
79
76
|
var classes = useStyles();
|
|
80
|
-
var dispatch = (0, _reactRedux.useDispatch)();
|
|
81
77
|
var history = (0, _reactRouterDom.useHistory)();
|
|
82
78
|
var _useState = (0, _react.useState)(true),
|
|
83
79
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -88,22 +84,16 @@ var ItemTile = function ItemTile(_ref) {
|
|
|
88
84
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
89
85
|
while (1) switch (_context.prev = _context.next) {
|
|
90
86
|
case 0:
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
break;
|
|
98
|
-
case 6:
|
|
99
|
-
_context.prev = 6;
|
|
100
|
-
_context.t0 = _context["catch"](0);
|
|
101
|
-
alert("could not load configuration: ".concat(linkTo));
|
|
102
|
-
case 9:
|
|
87
|
+
try {
|
|
88
|
+
history.push(link);
|
|
89
|
+
} catch (e) {
|
|
90
|
+
alert("could not load configuration: ".concat(linkTo));
|
|
91
|
+
}
|
|
92
|
+
case 1:
|
|
103
93
|
case "end":
|
|
104
94
|
return _context.stop();
|
|
105
95
|
}
|
|
106
|
-
}, _callee
|
|
96
|
+
}, _callee);
|
|
107
97
|
}));
|
|
108
98
|
return function handleClick(_x) {
|
|
109
99
|
return _ref2.apply(this, arguments);
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configuratorware/configurator-frontendgui",
|
|
3
|
-
"version": "1.48.
|
|
3
|
+
"version": "1.48.5",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@babel/polyfill": "^7.12.1",
|
|
9
|
-
"@configuratorware/scripts": "1.48.
|
|
9
|
+
"@configuratorware/scripts": "1.48.5",
|
|
10
10
|
"@material-ui/core": "^4.12.4",
|
|
11
11
|
"@material-ui/icons": "^4.11.3",
|
|
12
12
|
"@material-ui/lab": "^4.0.0-alpha.61",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"react-router-dom": "^5.3.4",
|
|
37
37
|
"react-swipeable": "^5.5.1",
|
|
38
38
|
"react-zoom-pan-pinch": "^2.1.3",
|
|
39
|
-
"redhotmagma-graphics-editor": "1.48.
|
|
40
|
-
"redhotmagma-visualization": "1.48.
|
|
39
|
+
"redhotmagma-graphics-editor": "1.48.5",
|
|
40
|
+
"redhotmagma-visualization": "1.48.5",
|
|
41
41
|
"redux": "^4.1.0",
|
|
42
42
|
"redux-logger": "^3.0.6",
|
|
43
43
|
"redux-persist": "^5.10.0",
|
|
@@ -4,10 +4,7 @@ import Typography from '@material-ui/core/Typography';
|
|
|
4
4
|
import MainButton from '../../../../../Shared/Components/MainButton';
|
|
5
5
|
import { T } from 'Framework/i18n';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
-
import { fetchConfiguration } from '../../../../Reducers/Configurator/Actions';
|
|
8
|
-
import { useDispatch } from 'react-redux';
|
|
9
7
|
import { useHistory } from 'react-router-dom';
|
|
10
|
-
import { withGlobalLoader } from '../../../../Reducers/UI/Actions';
|
|
11
8
|
import CircularProgress from '@material-ui/core/CircularProgress';
|
|
12
9
|
import getImageUrl from '../../../../Utils/getImageUrl';
|
|
13
10
|
|
|
@@ -56,13 +53,11 @@ const useStyles = makeStyles(
|
|
|
56
53
|
|
|
57
54
|
const ItemTile = ({ title, linkTo, image }) => {
|
|
58
55
|
const classes = useStyles();
|
|
59
|
-
const dispatch = useDispatch();
|
|
60
56
|
const history = useHistory();
|
|
61
57
|
const [loadState, setLoadState] = useState(true);
|
|
62
58
|
|
|
63
59
|
const handleClick = async link => {
|
|
64
60
|
try {
|
|
65
|
-
await dispatch(withGlobalLoader(fetchConfiguration(linkTo)));
|
|
66
61
|
history.push(link);
|
|
67
62
|
} catch (e) {
|
|
68
63
|
alert(`could not load configuration: ${linkTo}`);
|