@configuratorware/configurator-frontendgui 1.35.2 → 1.36.0-beta.0
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/App/Modules/Creator/Components/Optiondetail/index.js +14 -17
- package/App/Modules/Creator/CreatorScreen.js +4 -1
- package/App/Modules/Designer/DesignerScreen.js +4 -1
- package/App/Reducers/Configurator/Reducer.js +1 -1
- package/App/Shared/Components/SendEmail/index.js +1 -0
- package/Framework/Components/Carousel/index.js +20 -17
- package/Shared/Components/Swipeable.js +57 -0
- package/package.json +16 -23
- package/src/App/Modules/Creator/Components/Optiondetail/__snapshots__/index.test.js.snap +69 -75
- package/src/App/Modules/Creator/Components/Optiondetail/index.js +45 -50
- package/src/App/Modules/Creator/CreatorScreen.js +2 -0
- package/src/App/Modules/Designer/DesignerScreen.js +2 -0
- package/src/App/Reducers/Configurator/Reducer.js +1 -4
- package/src/App/Shared/Components/SendEmail/index.js +1 -0
- package/src/Framework/Components/Carousel/index.js +17 -16
- package/src/Shared/Components/Swipeable.js +10 -0
|
@@ -11,8 +11,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
13
13
|
|
|
14
|
-
var _reactSwipeable = require("react-swipeable");
|
|
15
|
-
|
|
16
14
|
var _clsx2 = _interopRequireDefault(require("clsx"));
|
|
17
15
|
|
|
18
16
|
var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
|
|
@@ -45,6 +43,8 @@ var _Markdown = _interopRequireDefault(require("../../../../../Framework/Compone
|
|
|
45
43
|
|
|
46
44
|
var _ZoomImage = _interopRequireDefault(require("./ZoomImage"));
|
|
47
45
|
|
|
46
|
+
var _Swipeable = require("../../../../../Shared/Components/Swipeable");
|
|
47
|
+
|
|
48
48
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
49
49
|
|
|
50
50
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -214,14 +214,11 @@ var Optiondetail = /*#__PURE__*/function (_React$Component) {
|
|
|
214
214
|
}
|
|
215
215
|
});
|
|
216
216
|
|
|
217
|
-
_defineProperty(_assertThisInitialized(_this), "swiped", function (e
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
} else {
|
|
223
|
-
_this.prev();
|
|
224
|
-
}
|
|
217
|
+
_defineProperty(_assertThisInitialized(_this), "swiped", function (e) {
|
|
218
|
+
if (e.dir === _Swipeable.LEFT) {
|
|
219
|
+
_this.next();
|
|
220
|
+
} else if (e.dir === _Swipeable.RIGHT) {
|
|
221
|
+
_this.prev();
|
|
225
222
|
}
|
|
226
223
|
});
|
|
227
224
|
|
|
@@ -428,12 +425,12 @@ var Optiondetail = /*#__PURE__*/function (_React$Component) {
|
|
|
428
425
|
}
|
|
429
426
|
}, /*#__PURE__*/_react["default"].createElement(LoadingComponent, {
|
|
430
427
|
show: loading
|
|
431
|
-
})) : /*#__PURE__*/_react["default"].createElement(
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
428
|
+
})) : /*#__PURE__*/_react["default"].createElement(_Swipeable.Swipeable, {
|
|
429
|
+
options: {
|
|
430
|
+
trackMouse: true,
|
|
431
|
+
onSwiped: showNav && this.swiped,
|
|
432
|
+
delta: Optiondetail.swipeDelta
|
|
433
|
+
},
|
|
437
434
|
ref: this.setDetailsContainerRef,
|
|
438
435
|
className: showNav ? classes.detailContainerWithNav : classes.detailContainer
|
|
439
436
|
}, showNav && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -453,7 +450,7 @@ var Optiondetail = /*#__PURE__*/function (_React$Component) {
|
|
|
453
450
|
})), detailsContent) : detailsContent, showNav && /*#__PURE__*/_react["default"].createElement("div", {
|
|
454
451
|
className: (0, _clsx2["default"])(classes.detailNav, 'next'),
|
|
455
452
|
onClick: this.next
|
|
456
|
-
})))
|
|
453
|
+
}))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
457
454
|
className: classes.detailFooter
|
|
458
455
|
}, this.renderControls())), /*#__PURE__*/_react["default"].createElement(_ZoomImage["default"], {
|
|
459
456
|
onClose: this.toggleZoomImage,
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.CreatorScreen = CreatorScreen;
|
|
9
|
+
exports["default"] = void 0;
|
|
9
10
|
|
|
10
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
12
|
|
|
@@ -304,4 +305,6 @@ CreatorScreen.defaultProps = {
|
|
|
304
305
|
},
|
|
305
306
|
Layout: _DefaultLayout["default"],
|
|
306
307
|
OptionsListContainer: _OptionsList["default"]
|
|
307
|
-
};
|
|
308
|
+
};
|
|
309
|
+
var _default = CreatorScreen;
|
|
310
|
+
exports["default"] = _default;
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.DesignerScreen = DesignerScreen;
|
|
9
|
+
exports["default"] = void 0;
|
|
9
10
|
|
|
10
11
|
var React = _interopRequireWildcard(require("react"));
|
|
11
12
|
|
|
@@ -252,4 +253,6 @@ DesignerScreen.defaultProps = {
|
|
|
252
253
|
TextEditorStateProvider: _DefaultCanvasProvider.DefaultTextEditorStateProvider,
|
|
253
254
|
Layout: _DefaultLayout["default"],
|
|
254
255
|
PopupArea: _PopupAreaProvider.PopupArea
|
|
255
|
-
};
|
|
256
|
+
};
|
|
257
|
+
var _default = DesignerScreen;
|
|
258
|
+
exports["default"] = _default;
|
|
@@ -667,6 +667,6 @@ function configuratorReducer() {
|
|
|
667
667
|
|
|
668
668
|
function filterOptionsWithDetails(options) {
|
|
669
669
|
return _lodash["default"].filter(options, function (option) {
|
|
670
|
-
return !!(option["abstract"] || option.description || option.
|
|
670
|
+
return !!(option["abstract"] || option.description || option.detailImage);
|
|
671
671
|
});
|
|
672
672
|
}
|
|
@@ -83,6 +83,7 @@ var SendEmail = function SendEmail(props) {
|
|
|
83
83
|
},
|
|
84
84
|
id: "alert-dialog-description"
|
|
85
85
|
}, (0, _i18n.t)('sendEmailDialog.info'))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_MainButton["default"], {
|
|
86
|
+
target: "_blank",
|
|
86
87
|
href: emailUrl,
|
|
87
88
|
onClick: onClose,
|
|
88
89
|
variant: "contained",
|
|
@@ -9,8 +9,6 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
12
|
-
var _reactSwipeable = require("react-swipeable");
|
|
13
|
-
|
|
14
12
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
15
13
|
|
|
16
14
|
require("./Styles.scss");
|
|
@@ -21,6 +19,8 @@ var _clsx = _interopRequireDefault(require("clsx"));
|
|
|
21
19
|
|
|
22
20
|
var _styles = require("@material-ui/core/styles");
|
|
23
21
|
|
|
22
|
+
var _Swipeable = require("../../../Shared/Components/Swipeable");
|
|
23
|
+
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
25
|
|
|
26
26
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -186,18 +186,16 @@ var Carousel = /*#__PURE__*/function (_React$Component) {
|
|
|
186
186
|
});
|
|
187
187
|
|
|
188
188
|
_defineProperty(_assertThisInitialized(_this), "swiped", function (e) {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
if (e.deltaY > 0) {
|
|
189
|
+
if (_this.props.vertical) {
|
|
190
|
+
if (e.dir === _Swipeable.UP) {
|
|
192
191
|
_this.next();
|
|
193
|
-
} else {
|
|
192
|
+
} else if (e.dir === _Swipeable.DOWN) {
|
|
194
193
|
_this.prev();
|
|
195
194
|
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
if (e.deltaX > 0) {
|
|
195
|
+
} else {
|
|
196
|
+
if (e.dir === _Swipeable.LEFT) {
|
|
199
197
|
_this.next();
|
|
200
|
-
} else {
|
|
198
|
+
} else if (e.dir === _Swipeable.RIGHT) {
|
|
201
199
|
_this.prev();
|
|
202
200
|
}
|
|
203
201
|
}
|
|
@@ -231,10 +229,13 @@ var Carousel = /*#__PURE__*/function (_React$Component) {
|
|
|
231
229
|
_createClass(Carousel, [{
|
|
232
230
|
key: "componentDidMount",
|
|
233
231
|
value: function componentDidMount() {
|
|
234
|
-
this.init();
|
|
235
232
|
var carousel = this.refs.carousel;
|
|
236
|
-
|
|
237
|
-
carousel
|
|
233
|
+
|
|
234
|
+
if (carousel) {
|
|
235
|
+
this.init();
|
|
236
|
+
var wheelEventName = 'onwheel' in carousel ? 'wheel' : 'mousewheel';
|
|
237
|
+
carousel.addEventListener(wheelEventName, this.scrolled);
|
|
238
|
+
}
|
|
238
239
|
}
|
|
239
240
|
}, {
|
|
240
241
|
key: "componentDidUpdate",
|
|
@@ -278,11 +279,13 @@ var Carousel = /*#__PURE__*/function (_React$Component) {
|
|
|
278
279
|
className: (0, _clsx["default"])(classes.carousel, prevClassName),
|
|
279
280
|
ref: "prev",
|
|
280
281
|
onClick: this.prev
|
|
281
|
-
}), /*#__PURE__*/_react["default"].createElement(
|
|
282
|
+
}), /*#__PURE__*/_react["default"].createElement(_Swipeable.Swipeable, {
|
|
282
283
|
className: 'carousel-frame',
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
284
|
+
options: {
|
|
285
|
+
trackMouse: true,
|
|
286
|
+
onSwiping: this.swiping,
|
|
287
|
+
onSwiped: this.swiped
|
|
288
|
+
}
|
|
286
289
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
287
290
|
className: "carousel-slider",
|
|
288
291
|
style: {
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "UP", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _reactSwipeable.UP;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "DOWN", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _reactSwipeable.DOWN;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "LEFT", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _reactSwipeable.LEFT;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "RIGHT", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _reactSwipeable.RIGHT;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
exports.Swipeable = void 0;
|
|
31
|
+
|
|
32
|
+
var _react = _interopRequireDefault(require("react"));
|
|
33
|
+
|
|
34
|
+
var _reactSwipeable = require("react-swipeable");
|
|
35
|
+
|
|
36
|
+
var _excluded = ["options"];
|
|
37
|
+
|
|
38
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
39
|
+
|
|
40
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
41
|
+
|
|
42
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
43
|
+
|
|
44
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
45
|
+
|
|
46
|
+
// eslint-disable-next-line react/prop-types,react/display-name
|
|
47
|
+
var Swipeable = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
|
|
48
|
+
var options = _ref.options,
|
|
49
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
50
|
+
|
|
51
|
+
var handlers = (0, _reactSwipeable.useSwipeable)(options);
|
|
52
|
+
return /*#__PURE__*/_react["default"].createElement("div", _extends({}, handlers, props, {
|
|
53
|
+
ref: ref
|
|
54
|
+
}));
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
exports.Swipeable = Swipeable;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configuratorware/configurator-frontendgui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.36.0-beta.0",
|
|
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.
|
|
10
|
-
"@hot-loader/react-dom": "^17.0.
|
|
9
|
+
"@configuratorware/scripts": "1.36.0-beta.0",
|
|
10
|
+
"@hot-loader/react-dom": "^17.0.2",
|
|
11
11
|
"@material-ui/core": "^4.12.2",
|
|
12
12
|
"@material-ui/icons": "^4.11.2",
|
|
13
13
|
"@material-ui/lab": "^4.0.0-alpha.60",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"path-browserify": "^1.0.1",
|
|
27
27
|
"prop-types": "^15.7.2",
|
|
28
28
|
"qs": "^6.10.1",
|
|
29
|
-
"react": "^
|
|
29
|
+
"react": "^17.0.2",
|
|
30
30
|
"react-custom-scrollbars": "^4.2.1",
|
|
31
|
-
"react-dom": "^
|
|
31
|
+
"react-dom": "^17.0.2",
|
|
32
32
|
"react-file-drop": "^0.2.8",
|
|
33
33
|
"react-hot-loader": "^4.13.0",
|
|
34
34
|
"react-hyphen": "^1.4.0",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"react-redux-i18n": "^1.9.3",
|
|
38
38
|
"react-router": "^5.2.0",
|
|
39
39
|
"react-router-dom": "^5.2.0",
|
|
40
|
-
"react-swipeable": "^
|
|
40
|
+
"react-swipeable": "^6.2.2",
|
|
41
41
|
"react-zoom-pan-pinch": "^2.1.3",
|
|
42
|
-
"redhotmagma-graphics-editor": "1.
|
|
43
|
-
"redhotmagma-visualization": "1.
|
|
42
|
+
"redhotmagma-graphics-editor": "1.36.0-beta.0",
|
|
43
|
+
"redhotmagma-visualization": "1.36.0-beta.0",
|
|
44
44
|
"redux": "^4.1.0",
|
|
45
45
|
"redux-logger": "^3.0.6",
|
|
46
46
|
"redux-persist": "^5.10.0",
|
|
@@ -52,25 +52,18 @@
|
|
|
52
52
|
"uuid": "^3.4.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@babel/plugin-proposal-class-properties": "^7.13.0",
|
|
56
|
-
"@babel/plugin-proposal-decorators": "^7.13.5",
|
|
57
|
-
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
58
|
-
"@babel/preset-env": "^7.13.12",
|
|
59
|
-
"@babel/preset-react": "^7.13.13",
|
|
60
|
-
"@babel/preset-typescript": "^7.13.0",
|
|
61
55
|
"babel-loader": "^8.2.2",
|
|
62
|
-
"
|
|
63
|
-
"css-loader": "^5.2.0",
|
|
56
|
+
"css-loader": "^5.2.7",
|
|
64
57
|
"file-loader": "^6.2.0",
|
|
65
|
-
"mini-css-extract-plugin": "^1.
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"sass-loader": "^11.0.1",
|
|
58
|
+
"mini-css-extract-plugin": "^2.1.0",
|
|
59
|
+
"resolve-url-loader": "^3.1.4",
|
|
60
|
+
"sass": "^1.53.0",
|
|
61
|
+
"sass-loader": "^13.0.2",
|
|
70
62
|
"style-loader": "^2.0.0",
|
|
63
|
+
"terser-webpack-plugin": "^5.1.4",
|
|
71
64
|
"url-loader": "^4.1.1",
|
|
72
|
-
"webpack": "^5.
|
|
73
|
-
"webpack-cli": "^4.
|
|
65
|
+
"webpack": "^5.46.0",
|
|
66
|
+
"webpack-cli": "^4.7.2",
|
|
74
67
|
"webpack-dev-server": "^3.11.2"
|
|
75
68
|
},
|
|
76
69
|
"scripts": {
|
|
@@ -5,30 +5,28 @@ exports[`Screens/Components/ImageEditDialog/MessageBox renders as a modal screen
|
|
|
5
5
|
<div
|
|
6
6
|
class="MuiDialogContent-root Optiondetail-detailDialogContentRoot-14"
|
|
7
7
|
>
|
|
8
|
-
<div
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
>
|
|
12
|
-
<div
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</p>
|
|
31
|
-
</div>
|
|
8
|
+
<div
|
|
9
|
+
class="Optiondetail-detailContainer-4"
|
|
10
|
+
>
|
|
11
|
+
<div>
|
|
12
|
+
<div
|
|
13
|
+
class="MuiTypography-root Optiondetail-detailsTypography-8 MuiTypography-body2"
|
|
14
|
+
>
|
|
15
|
+
<p>
|
|
16
|
+
Das sind schwarze Reissverschlüsse
|
|
17
|
+
</p>
|
|
18
|
+
</div>
|
|
19
|
+
<div
|
|
20
|
+
class="MuiTypography-root Optiondetail-priceFormatted-6 MuiTypography-body2"
|
|
21
|
+
>
|
|
22
|
+
0,00 €
|
|
23
|
+
</div>
|
|
24
|
+
<div
|
|
25
|
+
class="MuiTypography-root Optiondetail-detailsTypography-8 MuiTypography-body2"
|
|
26
|
+
>
|
|
27
|
+
<p>
|
|
28
|
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
|
|
29
|
+
</p>
|
|
32
30
|
</div>
|
|
33
31
|
</div>
|
|
34
32
|
</div>
|
|
@@ -62,30 +60,28 @@ exports[`Screens/Components/ImageEditDialog/MessageBox renders as full screen on
|
|
|
62
60
|
<div
|
|
63
61
|
class="MuiDialogContent-root Optiondetail-detailDialogContentRoot-14"
|
|
64
62
|
>
|
|
65
|
-
<div
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
>
|
|
69
|
-
<div
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
>
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
</p>
|
|
88
|
-
</div>
|
|
63
|
+
<div
|
|
64
|
+
class="Optiondetail-detailContainer-4"
|
|
65
|
+
>
|
|
66
|
+
<div>
|
|
67
|
+
<div
|
|
68
|
+
class="MuiTypography-root Optiondetail-detailsTypography-8 MuiTypography-body2"
|
|
69
|
+
>
|
|
70
|
+
<p>
|
|
71
|
+
Das sind schwarze Reissverschlüsse
|
|
72
|
+
</p>
|
|
73
|
+
</div>
|
|
74
|
+
<div
|
|
75
|
+
class="MuiTypography-root Optiondetail-priceFormatted-6 MuiTypography-body2"
|
|
76
|
+
>
|
|
77
|
+
0,00 €
|
|
78
|
+
</div>
|
|
79
|
+
<div
|
|
80
|
+
class="MuiTypography-root Optiondetail-detailsTypography-8 MuiTypography-body2"
|
|
81
|
+
>
|
|
82
|
+
<p>
|
|
83
|
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
|
|
84
|
+
</p>
|
|
89
85
|
</div>
|
|
90
86
|
</div>
|
|
91
87
|
</div>
|
|
@@ -119,38 +115,36 @@ exports[`Screens/Components/ImageEditDialog/MessageBox renders with previous and
|
|
|
119
115
|
<div
|
|
120
116
|
class="MuiDialogContent-root Optiondetail-detailDialogContentRoot-14"
|
|
121
117
|
>
|
|
122
|
-
<div
|
|
118
|
+
<div
|
|
119
|
+
class="Optiondetail-detailContainerWithNav-3"
|
|
120
|
+
>
|
|
123
121
|
<div
|
|
124
|
-
class="Optiondetail-
|
|
125
|
-
|
|
122
|
+
class="Optiondetail-detailNav-1 prev"
|
|
123
|
+
/>
|
|
124
|
+
<div>
|
|
125
|
+
<div
|
|
126
|
+
class="MuiTypography-root Optiondetail-detailsTypography-8 MuiTypography-body2"
|
|
127
|
+
>
|
|
128
|
+
<p>
|
|
129
|
+
Das sind schwarze Reissverschlüsse
|
|
130
|
+
</p>
|
|
131
|
+
</div>
|
|
126
132
|
<div
|
|
127
|
-
class="Optiondetail-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
<div
|
|
131
|
-
class="MuiTypography-root Optiondetail-detailsTypography-8 MuiTypography-body2"
|
|
132
|
-
>
|
|
133
|
-
<p>
|
|
134
|
-
Das sind schwarze Reissverschlüsse
|
|
135
|
-
</p>
|
|
136
|
-
</div>
|
|
137
|
-
<div
|
|
138
|
-
class="MuiTypography-root Optiondetail-priceFormatted-6 MuiTypography-body2"
|
|
139
|
-
>
|
|
140
|
-
0,00 €
|
|
141
|
-
</div>
|
|
142
|
-
<div
|
|
143
|
-
class="MuiTypography-root Optiondetail-detailsTypography-8 MuiTypography-body2"
|
|
144
|
-
>
|
|
145
|
-
<p>
|
|
146
|
-
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
|
|
147
|
-
</p>
|
|
148
|
-
</div>
|
|
133
|
+
class="MuiTypography-root Optiondetail-priceFormatted-6 MuiTypography-body2"
|
|
134
|
+
>
|
|
135
|
+
0,00 €
|
|
149
136
|
</div>
|
|
150
137
|
<div
|
|
151
|
-
class="Optiondetail-
|
|
152
|
-
|
|
138
|
+
class="MuiTypography-root Optiondetail-detailsTypography-8 MuiTypography-body2"
|
|
139
|
+
>
|
|
140
|
+
<p>
|
|
141
|
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
|
|
142
|
+
</p>
|
|
143
|
+
</div>
|
|
153
144
|
</div>
|
|
145
|
+
<div
|
|
146
|
+
class="Optiondetail-detailNav-1 next"
|
|
147
|
+
/>
|
|
154
148
|
</div>
|
|
155
149
|
</div>
|
|
156
150
|
<div
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import _ from 'lodash';
|
|
3
|
-
import { Swipeable } from 'react-swipeable';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
import Button from '@material-ui/core/Button';
|
|
6
5
|
import DialogContent from '@material-ui/core/DialogContent';
|
|
@@ -17,6 +16,7 @@ import OptionlistitemAmount from '../OptionAmount';
|
|
|
17
16
|
import getImageUrl from '../../../../Utils/getImageUrl';
|
|
18
17
|
import Markdown from '../../../../../Framework/Components/Markdown';
|
|
19
18
|
import ZoomImage from './ZoomImage';
|
|
19
|
+
import { LEFT, RIGHT, Swipeable } from '../../../../../Shared/Components/Swipeable';
|
|
20
20
|
|
|
21
21
|
const styles = theme => ({
|
|
22
22
|
detailNav: {
|
|
@@ -189,14 +189,11 @@ class Optiondetail extends React.Component {
|
|
|
189
189
|
}
|
|
190
190
|
};
|
|
191
191
|
|
|
192
|
-
swiped =
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
} else {
|
|
198
|
-
this.prev();
|
|
199
|
-
}
|
|
192
|
+
swiped = e => {
|
|
193
|
+
if (e.dir === LEFT) {
|
|
194
|
+
this.next();
|
|
195
|
+
} else if (e.dir === RIGHT) {
|
|
196
|
+
this.prev();
|
|
200
197
|
}
|
|
201
198
|
};
|
|
202
199
|
|
|
@@ -351,55 +348,53 @@ class Optiondetail extends React.Component {
|
|
|
351
348
|
</div>
|
|
352
349
|
) : (
|
|
353
350
|
<Swipeable
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
351
|
+
options={{
|
|
352
|
+
trackMouse: true,
|
|
353
|
+
onSwiped: showNav && this.swiped,
|
|
354
|
+
delta: Optiondetail.swipeDelta,
|
|
355
|
+
}}
|
|
356
|
+
ref={this.setDetailsContainerRef}
|
|
357
|
+
className={showNav ? classes.detailContainerWithNav : classes.detailContainer}
|
|
358
358
|
>
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
>
|
|
363
|
-
{showNav && (
|
|
364
|
-
<div className={clsx(classes.detailNav, 'prev')} onClick={this.prev} />
|
|
365
|
-
)}
|
|
359
|
+
{showNav && (
|
|
360
|
+
<div className={clsx(classes.detailNav, 'prev')} onClick={this.prev} />
|
|
361
|
+
)}
|
|
366
362
|
|
|
367
|
-
|
|
363
|
+
{detailImage ? (
|
|
364
|
+
<div
|
|
365
|
+
className={clsx({
|
|
366
|
+
[classes.detailsWithImageContainer]: !showFullScreenModal,
|
|
367
|
+
})}
|
|
368
|
+
>
|
|
368
369
|
<div
|
|
369
|
-
className={
|
|
370
|
-
|
|
371
|
-
|
|
370
|
+
className={
|
|
371
|
+
this.state.hasZoom
|
|
372
|
+
? classes.imageContainerWithZoom
|
|
373
|
+
: classes.imageContainer
|
|
374
|
+
}
|
|
375
|
+
onClick={this.state.hasZoom ? this.toggleZoomImage : null}
|
|
372
376
|
>
|
|
373
|
-
<
|
|
377
|
+
<img
|
|
378
|
+
ref={this.setDetailsImageRef}
|
|
379
|
+
onLoad={this.handleImageLoaded}
|
|
374
380
|
className={
|
|
375
|
-
this.state.
|
|
376
|
-
? classes.
|
|
377
|
-
: classes.
|
|
381
|
+
this.state.zoomImage && ['xs', 'sm'].includes(width)
|
|
382
|
+
? classes.imageHidden
|
|
383
|
+
: classes.image
|
|
378
384
|
}
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
ref={this.setDetailsImageRef}
|
|
383
|
-
onLoad={this.handleImageLoaded}
|
|
384
|
-
className={
|
|
385
|
-
this.state.zoomImage && ['xs', 'sm'].includes(width)
|
|
386
|
-
? classes.imageHidden
|
|
387
|
-
: classes.image
|
|
388
|
-
}
|
|
389
|
-
src={getImageUrl(detailImage)}
|
|
390
|
-
alt={details.title}
|
|
391
|
-
/>
|
|
392
|
-
</div>
|
|
393
|
-
{detailsContent}
|
|
385
|
+
src={getImageUrl(detailImage)}
|
|
386
|
+
alt={details.title}
|
|
387
|
+
/>
|
|
394
388
|
</div>
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
389
|
+
{detailsContent}
|
|
390
|
+
</div>
|
|
391
|
+
) : (
|
|
392
|
+
detailsContent
|
|
393
|
+
)}
|
|
398
394
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
</div>
|
|
395
|
+
{showNav && (
|
|
396
|
+
<div className={clsx(classes.detailNav, 'next')} onClick={this.next} />
|
|
397
|
+
)}
|
|
403
398
|
</Swipeable>
|
|
404
399
|
)}
|
|
405
400
|
</DialogContent>
|
|
@@ -628,8 +628,5 @@ export default function configuratorReducer(prevState = initialState, action = {
|
|
|
628
628
|
}
|
|
629
629
|
|
|
630
630
|
function filterOptionsWithDetails(options) {
|
|
631
|
-
return _.filter(
|
|
632
|
-
options,
|
|
633
|
-
option => !!(option.abstract || option.description || option.detailImageExists === true)
|
|
634
|
-
);
|
|
631
|
+
return _.filter(options, option => !!(option.abstract || option.description || option.detailImage));
|
|
635
632
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Swipeable } from 'react-swipeable';
|
|
3
2
|
import _ from 'lodash';
|
|
4
3
|
|
|
5
4
|
import './Styles.scss';
|
|
6
5
|
import PropTypes from 'prop-types';
|
|
7
6
|
import clsx from 'clsx';
|
|
8
7
|
import { withStyles } from '@material-ui/core/styles';
|
|
8
|
+
import { DOWN, LEFT, RIGHT, Swipeable, UP } from '../../../Shared/Components/Swipeable';
|
|
9
9
|
|
|
10
10
|
const styles = theme => ({
|
|
11
11
|
carousel: {
|
|
@@ -37,10 +37,12 @@ class Carousel extends React.Component {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
componentDidMount() {
|
|
40
|
-
this.init();
|
|
41
40
|
const { carousel } = this.refs;
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
if (carousel) {
|
|
42
|
+
this.init();
|
|
43
|
+
const wheelEventName = 'onwheel' in carousel ? 'wheel' : 'mousewheel';
|
|
44
|
+
carousel.addEventListener(wheelEventName, this.scrolled);
|
|
45
|
+
}
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
componentDidUpdate() {
|
|
@@ -140,19 +142,16 @@ class Carousel extends React.Component {
|
|
|
140
142
|
};
|
|
141
143
|
|
|
142
144
|
swiped = e => {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
if (e.deltaY > 0) {
|
|
145
|
+
if (this.props.vertical) {
|
|
146
|
+
if (e.dir === UP) {
|
|
146
147
|
this.next();
|
|
147
|
-
} else {
|
|
148
|
+
} else if (e.dir === DOWN) {
|
|
148
149
|
this.prev();
|
|
149
150
|
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
else if (!this.props.vertical && Math.abs(e.deltaX) >= Math.abs(e.deltaY)) {
|
|
153
|
-
if (e.deltaX > 0) {
|
|
151
|
+
} else {
|
|
152
|
+
if (e.dir === LEFT) {
|
|
154
153
|
this.next();
|
|
155
|
-
} else {
|
|
154
|
+
} else if (e.dir === RIGHT) {
|
|
156
155
|
this.prev();
|
|
157
156
|
}
|
|
158
157
|
}
|
|
@@ -199,9 +198,11 @@ class Carousel extends React.Component {
|
|
|
199
198
|
)}
|
|
200
199
|
<Swipeable
|
|
201
200
|
className={'carousel-frame'}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
201
|
+
options={{
|
|
202
|
+
trackMouse: true,
|
|
203
|
+
onSwiping: this.swiping,
|
|
204
|
+
onSwiped: this.swiped,
|
|
205
|
+
}}
|
|
205
206
|
>
|
|
206
207
|
<div
|
|
207
208
|
className="carousel-slider"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useSwipeable, UP, DOWN, LEFT, RIGHT } from 'react-swipeable';
|
|
3
|
+
|
|
4
|
+
export { UP, DOWN, LEFT, RIGHT };
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line react/prop-types,react/display-name
|
|
7
|
+
export const Swipeable = React.forwardRef(({ options, ...props }, ref) => {
|
|
8
|
+
const handlers = useSwipeable(options);
|
|
9
|
+
return <div {...handlers} {...props} ref={ref} />;
|
|
10
|
+
});
|