@configuratorware/configurator-frontendgui 1.38.7 → 1.39.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.
@@ -164,7 +164,8 @@ var AddImagePanel = /*#__PURE__*/function (_React$Component) {
164
164
  loaderComponent = _this$props3.loaderComponent,
165
165
  width = _this$props3.width,
166
166
  open = _this$props3.open,
167
- onSelectTag = _this$props3.onSelectTag;
167
+ onSelectTag = _this$props3.onSelectTag,
168
+ client = _this$props3.client;
168
169
  var selectedImage = this.state.selectedImage;
169
170
  var showImageLibrary = images.length > 0;
170
171
  var showFilters = tags.length > 0;
@@ -193,7 +194,8 @@ var AddImagePanel = /*#__PURE__*/function (_React$Component) {
193
194
  }), /*#__PURE__*/_react["default"].createElement(_ImageLibraryThumbnail["default"], {
194
195
  motives: images,
195
196
  onSelect: this.onSelectImage,
196
- selected: selectedImage
197
+ selected: selectedImage,
198
+ client: client
197
199
  }))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], {
198
200
  classes: {
199
201
  root: classes.actionsRoot
@@ -224,7 +226,8 @@ _defineProperty(AddImagePanel, "propTypes", {
224
226
  width: _propTypes["default"].string,
225
227
  open: _propTypes["default"].bool.isRequired,
226
228
  loadTags: _propTypes["default"].func,
227
- dismissError: _propTypes["default"].func
229
+ dismissError: _propTypes["default"].func,
230
+ client: _propTypes["default"].object
228
231
  });
229
232
 
230
233
  var _default = (0, _withWidth["default"])()((0, _styles.withStyles)(styles, {
@@ -19,6 +19,8 @@ var _AnalyticsWrapper = _interopRequireDefault(require("../../../../Shared/Compo
19
19
 
20
20
  require("./Styles.scss");
21
21
 
22
+ var _Typography = _interopRequireDefault(require("@material-ui/core/Typography/Typography"));
23
+
22
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
25
 
24
26
  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); }
@@ -50,7 +52,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
50
52
  var styles = function styles() {
51
53
  return {
52
54
  imageLibraryThumbnail: {
53
- width: 100,
55
+ width: 150,
54
56
  height: 'auto',
55
57
  borderRadius: 6,
56
58
  marginBottom: 10,
@@ -59,11 +61,26 @@ var styles = function styles() {
59
61
  cursor: 'pointer'
60
62
  }
61
63
  },
64
+ imageContainer: {
65
+ position: 'relative',
66
+ display: 'inline-block'
67
+ },
68
+ priceLabel: {
69
+ position: 'absolute',
70
+ background: '#0000005E',
71
+ borderRadius: 6,
72
+ padding: '4px',
73
+ bottom: '15px',
74
+ right: '10px'
75
+ },
76
+ priceLabelText: {
77
+ color: '#ffffff'
78
+ },
62
79
  activeGalleryImage: {
63
80
  border: '2px solid #ED1C29'
64
81
  },
65
82
  inactiveGalleryImage: {
66
- border: '1px solid #212121',
83
+ border: '1px solid #0000005E',
67
84
  padding: 1
68
85
  }
69
86
  };
@@ -71,7 +88,7 @@ var styles = function styles() {
71
88
 
72
89
  var motivesWrapper = {
73
90
  maxHeight: 600,
74
- minHeight: 255
91
+ minHeight: 355
75
92
  };
76
93
  var ImageThumbnail = (0, _styles.withStyles)(styles, {
77
94
  name: 'ImageThumbnail'
@@ -79,20 +96,29 @@ var ImageThumbnail = (0, _styles.withStyles)(styles, {
79
96
  var selected = _ref.selected,
80
97
  classes = _ref.classes,
81
98
  motive = _ref.motive,
82
- onSelect = _ref.onSelect;
83
- return /*#__PURE__*/_react["default"].createElement(_AnalyticsWrapper["default"], {
99
+ onSelect = _ref.onSelect,
100
+ hidePrices = _ref.hidePrices;
101
+ return /*#__PURE__*/_react["default"].createElement("div", {
102
+ className: classes.imageContainer
103
+ }, /*#__PURE__*/_react["default"].createElement(_AnalyticsWrapper["default"], {
84
104
  targetId: "image_thumbnail_select",
85
105
  data: motive
86
106
  }, /*#__PURE__*/_react["default"].createElement("img", {
87
107
  className: classes.imageLibraryThumbnail + ' ' + (selected === motive ? classes.activeGalleryImage : classes.inactiveGalleryImage),
88
108
  src: _typeof(motive) === 'object' ? motive.url : motive,
109
+ alt: _typeof(motive) === 'object' ? motive.title : motive,
89
110
  onClick: function onClick() {
90
111
  return onSelect(motive);
91
112
  },
92
113
  style: {
93
114
  background: motive.thumbnail && motive.thumbnail.isThumbnailBright ? '#c4c4c4' : 'transparent'
94
115
  }
95
- }));
116
+ })), !hidePrices && _typeof(motive) === 'object' && motive.priceFormatted !== null && /*#__PURE__*/_react["default"].createElement("div", {
117
+ className: classes.priceLabel
118
+ }, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
119
+ className: classes.priceLabelText,
120
+ variant: "body2"
121
+ }, motive.priceFormatted)));
96
122
  });
97
123
 
98
124
  var ImageLibraryThumbnail = /*#__PURE__*/function (_React$Component) {
@@ -126,7 +152,10 @@ var ImageLibraryThumbnail = /*#__PURE__*/function (_React$Component) {
126
152
 
127
153
  var _this$props = this.props,
128
154
  motives = _this$props.motives,
129
- selected = _this$props.selected;
155
+ selected = _this$props.selected,
156
+ client = _this$props.client;
157
+ var query = new URLSearchParams(location.search);
158
+ var hidePrices = query.has('_hide_prices') ? query.get('_hide_prices') === '1' : client && !!client.hidePrices;
130
159
  return /*#__PURE__*/_react["default"].createElement(_reactCustomScrollbars.Scrollbars, {
131
160
  autoHeightMin: 250,
132
161
  autoHide: true,
@@ -146,7 +175,8 @@ var ImageLibraryThumbnail = /*#__PURE__*/function (_React$Component) {
146
175
  key: i,
147
176
  motive: motive,
148
177
  onSelect: _this2.onSelect,
149
- selected: selected
178
+ selected: selected,
179
+ hidePrices: hidePrices
150
180
  });
151
181
  }));
152
182
  }
@@ -158,7 +188,8 @@ var ImageLibraryThumbnail = /*#__PURE__*/function (_React$Component) {
158
188
  _defineProperty(ImageLibraryThumbnail, "propTypes", {
159
189
  motives: _propTypes["default"].array,
160
190
  onSelect: _propTypes["default"].func,
161
- selected: _propTypes["default"].object
191
+ selected: _propTypes["default"].object,
192
+ client: _propTypes["default"].object
162
193
  });
163
194
 
164
195
  var _default = ImageLibraryThumbnail;
@@ -61,6 +61,8 @@ var _ImageEditUtils = require("../Utils/ImageEditUtils");
61
61
 
62
62
  var _Transformers = require("../Utils/Transformers");
63
63
 
64
+ var _Selectors5 = require("../../../Reducers/Configurator/Selectors");
65
+
64
66
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
65
67
 
66
68
  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); }
@@ -941,7 +943,8 @@ var ImageEditDialogContainer = /*#__PURE__*/function (_React$Component) {
941
943
  ImageUploadComponent = _this$props6.ImageUploadComponent,
942
944
  customControlElements = _this$props6.customControlElements,
943
945
  checkOwnership = _this$props6.checkOwnership,
944
- designProductionMethod = _this$props6.designProductionMethod;
946
+ designProductionMethod = _this$props6.designProductionMethod,
947
+ client = _this$props6.client;
945
948
  var _this$state3 = this.state,
946
949
  preview = _this$state3.preview,
947
950
  clipping = _this$state3.clipping,
@@ -1031,7 +1034,8 @@ var ImageEditDialogContainer = /*#__PURE__*/function (_React$Component) {
1031
1034
  })), /*#__PURE__*/_react["default"].createElement(_AddGalleryImage["default"], {
1032
1035
  open: this.state.showAddImagePanel,
1033
1036
  onClose: this.closeAddImagePanel,
1034
- onSelectImage: this.onSelectImage
1037
+ onSelectImage: this.onSelectImage,
1038
+ client: client
1035
1039
  }));
1036
1040
  }
1037
1041
  }]);
@@ -1073,7 +1077,8 @@ _defineProperty(ImageEditDialogContainer, "propTypes", {
1073
1077
  ImageColorizeComponent: _propTypes["default"].elementType,
1074
1078
  ImageUploadComponent: _propTypes["default"].elementType,
1075
1079
  customControlElements: _propTypes["default"].oneOfType([_propTypes["default"].arrayOf(_propTypes["default"].node), _propTypes["default"].node]),
1076
- checkOwnership: _propTypes["default"].bool
1080
+ checkOwnership: _propTypes["default"].bool,
1081
+ client: _propTypes["default"].object
1077
1082
  });
1078
1083
 
1079
1084
  _defineProperty(ImageEditDialogContainer, "defaultProps", {
@@ -1119,6 +1124,7 @@ var mapStateToProps = function mapStateToProps(state) {
1119
1124
  var imageColorsWereEdited = userImage && !!userImage.imageColorsWereEdited;
1120
1125
  var initialColorMaxAmount = (0, _Selectors2.getInitialMaxColorAmount)(state);
1121
1126
  var colorPreviewRequirementFulfilled = (0, _Selectors3.isColorPreviewCompatible)(state, userImage);
1127
+ var client = (0, _Selectors5.getClient)((0, _Selectors5.getConfigurator)(state));
1122
1128
  return {
1123
1129
  Component: open ? ImageEditDialogContainer : function () {
1124
1130
  return null;
@@ -1145,7 +1151,8 @@ var mapStateToProps = function mapStateToProps(state) {
1145
1151
  hasPlaceHolderImage: hasPlaceHolderImage,
1146
1152
  initialColorMaxAmount: initialColorMaxAmount,
1147
1153
  colorPreviewRequirementFulfilled: colorPreviewRequirementFulfilled,
1148
- designProductionMethod: designProductionMethod
1154
+ designProductionMethod: designProductionMethod,
1155
+ client: client
1149
1156
  };
1150
1157
  };
1151
1158
 
@@ -176,7 +176,16 @@ var applicationConfiguration = {
176
176
  // create a ground to show a shadow under the model
177
177
  useShadowGround: true,
178
178
  // remove the shadow ground for screenshots
179
- removeGroundForScreenshot: true
179
+ removeGroundForScreenshot: true,
180
+ // use an environment map
181
+ useEnvironmentMap: true,
182
+ // use programmatically generated baked shadow (instead of directional light shadow)
183
+ useBakedShadows: false,
184
+ // baked shadow parameters (for all available see redhotmagma-visualization/src/Three/Three3DScene.js)
185
+ bakedShadow: {
186
+ blurRadius: 6,
187
+ shadowOpacity: 0.8
188
+ }
180
189
  }
181
190
  },
182
191
  designer: {
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@configuratorware/configurator-frontendgui",
3
- "version": "1.38.7",
3
+ "version": "1.39.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.38.7",
9
+ "@configuratorware/scripts": "1.39.0",
10
10
  "@hot-loader/react-dom": "^17.0.1",
11
11
  "@material-ui/core": "^4.12.2",
12
12
  "@material-ui/icons": "^4.11.2",
@@ -39,8 +39,8 @@
39
39
  "react-router-dom": "^5.2.0",
40
40
  "react-swipeable": "^5.5.1",
41
41
  "react-zoom-pan-pinch": "^2.1.3",
42
- "redhotmagma-graphics-editor": "1.38.7",
43
- "redhotmagma-visualization": "1.38.7",
42
+ "redhotmagma-graphics-editor": "1.39.0",
43
+ "redhotmagma-visualization": "1.39.0",
44
44
  "redux": "^4.1.0",
45
45
  "redux-logger": "^3.0.6",
46
46
  "redux-persist": "^5.10.0",
@@ -39,51 +39,147 @@ exports[`renders correctly 1`] = `
39
39
  </span>
40
40
  </button>
41
41
  <div
42
- style="position:relative;overflow:hidden;width:100%;height:100%;max-height:600px;min-height:255px"
42
+ style="position:relative;overflow:hidden;width:100%;height:100%;max-height:600px;min-height:355px"
43
43
  >
44
44
  <div
45
45
  style="position:absolute;top:0;left:0;right:0;bottom:0;overflow:scroll;-webkit-overflow-scrolling:touch;margin-right:0;margin-bottom:0"
46
46
  >
47
- <img
48
- class="ImageThumbnail-imageLibraryThumbnail-12 ImageThumbnail-inactiveGalleryImage-14"
49
- src="./res/Kreis.jpg"
50
- style="background:#c4c4c4"
51
- />
52
- <img
53
- class="ImageThumbnail-imageLibraryThumbnail-12 ImageThumbnail-inactiveGalleryImage-14"
54
- src="./res/Kreis.jpg"
55
- style="background:transparent"
56
- />
57
- <img
58
- class="ImageThumbnail-imageLibraryThumbnail-12 ImageThumbnail-inactiveGalleryImage-14"
59
- src="./res/Rechteck.jpg"
60
- style="background:transparent"
61
- />
62
- <img
63
- class="ImageThumbnail-imageLibraryThumbnail-12 ImageThumbnail-inactiveGalleryImage-14"
64
- src="./res/Rechteck.jpg"
65
- style="background:transparent"
66
- />
67
- <img
68
- class="ImageThumbnail-imageLibraryThumbnail-12 ImageThumbnail-inactiveGalleryImage-14"
69
- src="./res/Kreis.jpg"
70
- style="background:transparent"
71
- />
72
- <img
73
- class="ImageThumbnail-imageLibraryThumbnail-12 ImageThumbnail-inactiveGalleryImage-14"
74
- src="./res/Kreis.jpg"
75
- style="background:transparent"
76
- />
77
- <img
78
- class="ImageThumbnail-imageLibraryThumbnail-12 ImageThumbnail-inactiveGalleryImage-14"
79
- src="./res/Stern.jpg"
80
- style="background:transparent"
81
- />
82
- <img
83
- class="ImageThumbnail-imageLibraryThumbnail-12 ImageThumbnail-inactiveGalleryImage-14"
84
- src="./res/Stern.jpg"
85
- style="background:transparent"
86
- />
47
+ <div
48
+ class="ImageThumbnail-imageContainer-13"
49
+ >
50
+ <img
51
+ alt="Symbole"
52
+ class="ImageThumbnail-imageLibraryThumbnail-12 ImageThumbnail-inactiveGalleryImage-17"
53
+ src="./res/Kreis.jpg"
54
+ style="background:#c4c4c4"
55
+ />
56
+ <div
57
+ class="ImageThumbnail-priceLabel-14"
58
+ >
59
+ <p
60
+ class="MuiTypography-root ImageThumbnail-priceLabelText-15 MuiTypography-body2"
61
+ />
62
+ </div>
63
+ </div>
64
+ <div
65
+ class="ImageThumbnail-imageContainer-13"
66
+ >
67
+ <img
68
+ alt="Branchen"
69
+ class="ImageThumbnail-imageLibraryThumbnail-12 ImageThumbnail-inactiveGalleryImage-17"
70
+ src="./res/Kreis.jpg"
71
+ style="background:transparent"
72
+ />
73
+ <div
74
+ class="ImageThumbnail-priceLabel-14"
75
+ >
76
+ <p
77
+ class="MuiTypography-root ImageThumbnail-priceLabelText-15 MuiTypography-body2"
78
+ />
79
+ </div>
80
+ </div>
81
+ <div
82
+ class="ImageThumbnail-imageContainer-13"
83
+ >
84
+ <img
85
+ alt="Männer"
86
+ class="ImageThumbnail-imageLibraryThumbnail-12 ImageThumbnail-inactiveGalleryImage-17"
87
+ src="./res/Rechteck.jpg"
88
+ style="background:transparent"
89
+ />
90
+ <div
91
+ class="ImageThumbnail-priceLabel-14"
92
+ >
93
+ <p
94
+ class="MuiTypography-root ImageThumbnail-priceLabelText-15 MuiTypography-body2"
95
+ />
96
+ </div>
97
+ </div>
98
+ <div
99
+ class="ImageThumbnail-imageContainer-13"
100
+ >
101
+ <img
102
+ alt="Frauen"
103
+ class="ImageThumbnail-imageLibraryThumbnail-12 ImageThumbnail-inactiveGalleryImage-17"
104
+ src="./res/Rechteck.jpg"
105
+ style="background:transparent"
106
+ />
107
+ <div
108
+ class="ImageThumbnail-priceLabel-14"
109
+ >
110
+ <p
111
+ class="MuiTypography-root ImageThumbnail-priceLabelText-15 MuiTypography-body2"
112
+ />
113
+ </div>
114
+ </div>
115
+ <div
116
+ class="ImageThumbnail-imageContainer-13"
117
+ >
118
+ <img
119
+ alt="Figuren"
120
+ class="ImageThumbnail-imageLibraryThumbnail-12 ImageThumbnail-inactiveGalleryImage-17"
121
+ src="./res/Kreis.jpg"
122
+ style="background:transparent"
123
+ />
124
+ <div
125
+ class="ImageThumbnail-priceLabel-14"
126
+ >
127
+ <p
128
+ class="MuiTypography-root ImageThumbnail-priceLabelText-15 MuiTypography-body2"
129
+ />
130
+ </div>
131
+ </div>
132
+ <div
133
+ class="ImageThumbnail-imageContainer-13"
134
+ >
135
+ <img
136
+ alt="Geometrisch1"
137
+ class="ImageThumbnail-imageLibraryThumbnail-12 ImageThumbnail-inactiveGalleryImage-17"
138
+ src="./res/Kreis.jpg"
139
+ style="background:transparent"
140
+ />
141
+ <div
142
+ class="ImageThumbnail-priceLabel-14"
143
+ >
144
+ <p
145
+ class="MuiTypography-root ImageThumbnail-priceLabelText-15 MuiTypography-body2"
146
+ />
147
+ </div>
148
+ </div>
149
+ <div
150
+ class="ImageThumbnail-imageContainer-13"
151
+ >
152
+ <img
153
+ alt="Figuren1"
154
+ class="ImageThumbnail-imageLibraryThumbnail-12 ImageThumbnail-inactiveGalleryImage-17"
155
+ src="./res/Stern.jpg"
156
+ style="background:transparent"
157
+ />
158
+ <div
159
+ class="ImageThumbnail-priceLabel-14"
160
+ >
161
+ <p
162
+ class="MuiTypography-root ImageThumbnail-priceLabelText-15 MuiTypography-body2"
163
+ />
164
+ </div>
165
+ </div>
166
+ <div
167
+ class="ImageThumbnail-imageContainer-13"
168
+ >
169
+ <img
170
+ alt="Geometrisch"
171
+ class="ImageThumbnail-imageLibraryThumbnail-12 ImageThumbnail-inactiveGalleryImage-17"
172
+ src="./res/Stern.jpg"
173
+ style="background:transparent"
174
+ />
175
+ <div
176
+ class="ImageThumbnail-priceLabel-14"
177
+ >
178
+ <p
179
+ class="MuiTypography-root ImageThumbnail-priceLabelText-15 MuiTypography-body2"
180
+ />
181
+ </div>
182
+ </div>
87
183
  </div>
88
184
  <div
89
185
  style="position:absolute;height:6px;transition:opacity 200ms;opacity:0;display:none;right:2px;bottom:2px;left:2px;border-radius:3px"
@@ -107,13 +203,13 @@ exports[`renders correctly 1`] = `
107
203
  class="MuiDialogActions-root AddImagePanel-actionsRoot-4 MuiDialogActions-spacing"
108
204
  >
109
205
  <button
110
- class="MuiButtonBase-root MuiButton-root MainButton-root-15 MuiButton-contained AddImagePanel-applyButton-5 Mui-disabled Mui-disabled"
206
+ class="MuiButtonBase-root MuiButton-root MainButton-root-18 MuiButton-contained AddImagePanel-applyButton-5 Mui-disabled Mui-disabled"
111
207
  disabled=""
112
208
  tabindex="-1"
113
209
  type="button"
114
210
  >
115
211
  <span
116
- class="MuiButton-label MainButton-label-16"
212
+ class="MuiButton-label MainButton-label-19"
117
213
  >
118
214
  fileUpload.apply
119
215
  </span>
@@ -61,6 +61,7 @@ class AddImagePanel extends React.Component {
61
61
  open: PropTypes.bool.isRequired,
62
62
  loadTags: PropTypes.func,
63
63
  dismissError: PropTypes.func,
64
+ client: PropTypes.object,
64
65
  };
65
66
 
66
67
  componentDidUpdate(prevProps) {
@@ -88,7 +89,17 @@ class AddImagePanel extends React.Component {
88
89
  };
89
90
 
90
91
  render() {
91
- const { tags, images, onClose, classes, loaderComponent, width, open, onSelectTag } = this.props;
92
+ const {
93
+ tags,
94
+ images,
95
+ onClose,
96
+ classes,
97
+ loaderComponent,
98
+ width,
99
+ open,
100
+ onSelectTag,
101
+ client,
102
+ } = this.props;
92
103
  const { selectedImage } = this.state;
93
104
 
94
105
  const showImageLibrary = images.length > 0;
@@ -122,6 +133,7 @@ class AddImagePanel extends React.Component {
122
133
  motives={images}
123
134
  onSelect={this.onSelectImage}
124
135
  selected={selectedImage}
136
+ client={client}
125
137
  />
126
138
  </>
127
139
  )}
@@ -5,10 +5,11 @@ import { Scrollbars } from 'react-custom-scrollbars';
5
5
  import { preventEventDoubling } from 'Utils/Events/preventEventDoubling';
6
6
  import AnalyticsWrapper from 'App/Shared/Components/Analytics/AnalyticsWrapper';
7
7
  import './Styles.scss';
8
+ import Typography from '@material-ui/core/Typography/Typography';
8
9
 
9
10
  const styles = () => ({
10
11
  imageLibraryThumbnail: {
11
- width: 100,
12
+ width: 150,
12
13
  height: 'auto',
13
14
  borderRadius: 6,
14
15
  marginBottom: 10,
@@ -18,37 +19,64 @@ const styles = () => ({
18
19
  cursor: 'pointer',
19
20
  },
20
21
  },
22
+ imageContainer: {
23
+ position: 'relative',
24
+ display: 'inline-block',
25
+ },
26
+ priceLabel: {
27
+ position: 'absolute',
28
+ background: '#0000005E',
29
+ borderRadius: 6,
30
+ padding: '4px',
31
+ bottom: '15px',
32
+ right: '10px',
33
+ },
34
+ priceLabelText: {
35
+ color: '#ffffff',
36
+ },
21
37
  activeGalleryImage: {
22
38
  border: '2px solid #ED1C29',
23
39
  },
24
40
  inactiveGalleryImage: {
25
- border: '1px solid #212121',
41
+ border: '1px solid #0000005E',
26
42
  padding: 1,
27
43
  },
28
44
  });
29
45
 
30
46
  const motivesWrapper = {
31
47
  maxHeight: 600,
32
- minHeight: 255,
48
+ minHeight: 355,
33
49
  };
34
50
 
35
51
  const ImageThumbnail = withStyles(styles, { name: 'ImageThumbnail' })(
36
- ({ selected, classes, motive, onSelect }) => (
37
- <AnalyticsWrapper targetId="image_thumbnail_select" data={motive}>
38
- <img
39
- className={
40
- classes.imageLibraryThumbnail +
41
- ' ' +
42
- (selected === motive ? classes.activeGalleryImage : classes.inactiveGalleryImage)
43
- }
44
- src={typeof motive === 'object' ? motive.url : motive}
45
- onClick={() => onSelect(motive)}
46
- style={{
47
- background:
48
- motive.thumbnail && motive.thumbnail.isThumbnailBright ? '#c4c4c4' : 'transparent',
49
- }}
50
- />
51
- </AnalyticsWrapper>
52
+ ({ selected, classes, motive, onSelect, hidePrices }) => (
53
+ <div className={classes.imageContainer}>
54
+ <AnalyticsWrapper targetId="image_thumbnail_select" data={motive}>
55
+ <img
56
+ className={
57
+ classes.imageLibraryThumbnail +
58
+ ' ' +
59
+ (selected === motive ? classes.activeGalleryImage : classes.inactiveGalleryImage)
60
+ }
61
+ src={typeof motive === 'object' ? motive.url : motive}
62
+ alt={typeof motive === 'object' ? motive.title : motive}
63
+ onClick={() => onSelect(motive)}
64
+ style={{
65
+ background:
66
+ motive.thumbnail && motive.thumbnail.isThumbnailBright
67
+ ? '#c4c4c4'
68
+ : 'transparent',
69
+ }}
70
+ />
71
+ </AnalyticsWrapper>
72
+ {!hidePrices && typeof motive === 'object' && motive.priceFormatted !== null && (
73
+ <div className={classes.priceLabel}>
74
+ <Typography className={classes.priceLabelText} variant="body2">
75
+ {motive.priceFormatted}
76
+ </Typography>
77
+ </div>
78
+ )}
79
+ </div>
52
80
  )
53
81
  );
54
82
 
@@ -57,6 +85,7 @@ class ImageLibraryThumbnail extends React.Component {
57
85
  motives: PropTypes.array,
58
86
  onSelect: PropTypes.func,
59
87
  selected: PropTypes.object,
88
+ client: PropTypes.object,
60
89
  };
61
90
  onSelect = preventEventDoubling(item => {
62
91
  const { onSelect } = this.props;
@@ -64,8 +93,11 @@ class ImageLibraryThumbnail extends React.Component {
64
93
  });
65
94
 
66
95
  render() {
67
- const { motives, selected } = this.props;
68
-
96
+ const { motives, selected, client } = this.props;
97
+ const query = new URLSearchParams(location.search);
98
+ const hidePrices = query.has('_hide_prices')
99
+ ? query.get('_hide_prices') === '1'
100
+ : client && !!client.hidePrices;
69
101
  return (
70
102
  <Scrollbars
71
103
  autoHeightMin={250}
@@ -75,7 +107,13 @@ class ImageLibraryThumbnail extends React.Component {
75
107
  style={motivesWrapper}
76
108
  >
77
109
  {motives.map((motive, i) => (
78
- <ImageThumbnail key={i} motive={motive} onSelect={this.onSelect} selected={selected} />
110
+ <ImageThumbnail
111
+ key={i}
112
+ motive={motive}
113
+ onSelect={this.onSelect}
114
+ selected={selected}
115
+ hidePrices={hidePrices}
116
+ />
79
117
  ))}
80
118
  </Scrollbars>
81
119
  );
@@ -52,6 +52,7 @@ import { getConf } from 'App/configuration';
52
52
  import { EventTypes } from 'App/Constant';
53
53
  import { expandVectorizeColorsMap, getClosestColorFromMap } from '../Utils/ImageEditUtils';
54
54
  import { getRasterURL, isOriginalVector } from '../Utils/Transformers';
55
+ import { getClient, getConfigurator } from '../../../Reducers/Configurator/Selectors';
55
56
 
56
57
  const getOperationsFromState = state => {
57
58
  const { clipping, clippingColor, vectorize, vectorizeThreshold, vectorizeColorsMap } = state;
@@ -124,6 +125,7 @@ export class ImageEditDialogContainer extends React.Component {
124
125
  ImageUploadComponent: PropTypes.elementType,
125
126
  customControlElements: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
126
127
  checkOwnership: PropTypes.bool,
128
+ client: PropTypes.object,
127
129
  };
128
130
 
129
131
  static defaultProps = {
@@ -650,6 +652,7 @@ export class ImageEditDialogContainer extends React.Component {
650
652
  customControlElements,
651
653
  checkOwnership,
652
654
  designProductionMethod,
655
+ client,
653
656
  } = this.props;
654
657
  const {
655
658
  preview,
@@ -751,6 +754,7 @@ export class ImageEditDialogContainer extends React.Component {
751
754
  open={this.state.showAddImagePanel}
752
755
  onClose={this.closeAddImagePanel}
753
756
  onSelectImage={this.onSelectImage}
757
+ client={client}
754
758
  />
755
759
  </React.Fragment>
756
760
  );
@@ -795,6 +799,7 @@ const mapStateToProps = state => {
795
799
  const imageColorsWereEdited = userImage && !!userImage.imageColorsWereEdited;
796
800
  const initialColorMaxAmount = getInitialMaxColorAmount(state);
797
801
  const colorPreviewRequirementFulfilled = isColorPreviewCompatible(state, userImage);
802
+ const client = getClient(getConfigurator(state));
798
803
 
799
804
  return {
800
805
  Component: open ? ImageEditDialogContainer : () => null,
@@ -821,6 +826,7 @@ const mapStateToProps = state => {
821
826
  initialColorMaxAmount,
822
827
  colorPreviewRequirementFulfilled,
823
828
  designProductionMethod,
829
+ client,
824
830
  };
825
831
  };
826
832
 
@@ -193,6 +193,15 @@ let applicationConfiguration = {
193
193
  useShadowGround: true,
194
194
  // remove the shadow ground for screenshots
195
195
  removeGroundForScreenshot: true,
196
+ // use an environment map
197
+ useEnvironmentMap: true,
198
+ // use programmatically generated baked shadow (instead of directional light shadow)
199
+ useBakedShadows: false,
200
+ // baked shadow parameters (for all available see redhotmagma-visualization/src/Three/Three3DScene.js)
201
+ bakedShadow: {
202
+ blurRadius: 6,
203
+ shadowOpacity: 0.8,
204
+ },
196
205
  },
197
206
  },
198
207