@configuratorware/configurator-frontendgui 1.31.4 → 1.31.7

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.
@@ -229,7 +229,8 @@ var ImageColorize = /*#__PURE__*/function (_React$Component) {
229
229
  selectedColorPalette: null,
230
230
  vectorizeThreshold: 0,
231
231
  isThresholdSliderDisabled: false,
232
- designProductionMethodName: ''
232
+ designProductionMethodName: '',
233
+ vectorizeRequested: false
233
234
  });
234
235
 
235
236
  _defineProperty(_assertThisInitialized(_this), "onVectorizeThresholdChange", function (event) {
@@ -327,6 +328,11 @@ var ImageColorize = /*#__PURE__*/function (_React$Component) {
327
328
 
328
329
  _defineProperty(_assertThisInitialized(_this), "onVectorizeToggleChange", function (e, value) {
329
330
  var onVectorizeToggleChange = _this.props.onVectorizeToggleChange;
331
+
332
+ _this.setState({
333
+ vectorizeRequested: value
334
+ });
335
+
330
336
  onVectorizeToggleChange && onVectorizeToggleChange(value);
331
337
  });
332
338
 
@@ -449,7 +455,8 @@ var ImageColorize = /*#__PURE__*/function (_React$Component) {
449
455
  customControlElements = _this$props4.customControlElements;
450
456
  var _this$state = this.state,
451
457
  selectedColor = _this$state.selectedColor,
452
- vectorizeThreshold = _this$state.vectorizeThreshold;
458
+ vectorizeThreshold = _this$state.vectorizeThreshold,
459
+ vectorizeRequested = _this$state.vectorizeRequested;
453
460
  var onColorRemoveClick = this.props.onColorRemoveClick;
454
461
  var thresholdValue = colorAmountList.indexOf(vectorizeThreshold) === -1 ? 0 : vectorizeThreshold;
455
462
  var amountIsValid = this.validateAmount();
@@ -488,7 +495,7 @@ var ImageColorize = /*#__PURE__*/function (_React$Component) {
488
495
  }) : (0, _i18n.t)('imageEditDialog.imageColors', {
489
496
  amount: colorAmount
490
497
  })));
491
- }))), imageColorsWereEdited && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
498
+ }))), (imageColorsWereEdited || vectorizeRequested) && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
492
499
  variant: "outlined",
493
500
  onClick: this.resetImageState,
494
501
  disabled: isLoading,
@@ -435,6 +435,8 @@ var VisualizationService = /*#__PURE__*/function (_AbstractVisualizatio) {
435
435
  (0, _sendMessage["default"])(component, 'clearViewIfEmpty', !!isAdminMode);
436
436
  var visualizationOverlayMode = (0, _configuration.getConf)('visualizationOverlayMode');
437
437
  (0, _sendMessage["default"])(component, 'setOverlayMode', !!visualizationOverlayMode);
438
+ var visualizationOptions = (0, _configuration.getConf)('visualization.options');
439
+ (0, _sendMessage["default"])(component, 'setOptions', visualizationOptions);
438
440
  this.observable.dispatch(EventTypes.ComponentChange, {
439
441
  component: component
440
442
  });
@@ -51,7 +51,8 @@ var styles = function styles(theme) {
51
51
  return {
52
52
  cardPriceOverview: (_cardPriceOverview = {
53
53
  fontSize: 12,
54
- boxShadow: 'none'
54
+ boxShadow: 'none',
55
+ overflow: 'initial'
55
56
  }, _defineProperty(_cardPriceOverview, theme.breakpoints.down('md'), {
56
57
  boxShadow: 'none'
57
58
  }), _defineProperty(_cardPriceOverview, theme.breakpoints.down('sm'), {
@@ -164,7 +164,14 @@ var applicationConfiguration = {
164
164
 
165
165
  },
166
166
  visualization: {
167
- designAreaHighlightBackgroundColor: 'transparent'
167
+ designAreaHighlightBackgroundColor: 'transparent',
168
+ options: {
169
+ // when zoom = 1 use NearestFilter (for sharper product image)
170
+ sharperFullView: false,
171
+ // upscale or downscale the product image to fit 2048 x 2048
172
+ // Warning! not recommended, use better image resources instead
173
+ optimizeProductImage: false
174
+ }
168
175
  },
169
176
  designer: {
170
177
  dpi: 300,
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@configuratorware/configurator-frontendgui",
3
- "version": "1.31.4",
3
+ "version": "1.31.7",
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.31.4",
9
+ "@configuratorware/scripts": "1.31.7",
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.31.4",
43
- "redhotmagma-visualization": "1.31.4",
42
+ "redhotmagma-graphics-editor": "1.31.7",
43
+ "redhotmagma-visualization": "1.31.7",
44
44
  "redux": "^4.1.0",
45
45
  "redux-logger": "^3.0.6",
46
46
  "redux-persist": "^5.10.0",
@@ -93,7 +93,9 @@ function getConfig(mode, dirname) {
93
93
  hot: true,
94
94
  contentBase: BUILD_DIR,
95
95
  publicPath: '/',
96
- historyApiFallback: true,
96
+ historyApiFallback: {
97
+ disableDotRule: true,
98
+ },
97
99
  },
98
100
  module: {
99
101
  rules: [
@@ -175,6 +175,7 @@ class ImageColorize extends React.Component {
175
175
  vectorizeThreshold: 0,
176
176
  isThresholdSliderDisabled: false,
177
177
  designProductionMethodName: '',
178
+ vectorizeRequested: false,
178
179
  };
179
180
 
180
181
  componentDidMount() {
@@ -256,7 +257,9 @@ class ImageColorize extends React.Component {
256
257
 
257
258
  onVectorizeToggleChange = (e, value) => {
258
259
  const { onVectorizeToggleChange } = this.props;
259
-
260
+ this.setState({
261
+ vectorizeRequested: value,
262
+ });
260
263
  onVectorizeToggleChange && onVectorizeToggleChange(value);
261
264
  };
262
265
 
@@ -331,7 +334,7 @@ class ImageColorize extends React.Component {
331
334
  colorAmountList,
332
335
  customControlElements,
333
336
  } = this.props;
334
- const { selectedColor, vectorizeThreshold } = this.state;
337
+ const { selectedColor, vectorizeThreshold, vectorizeRequested } = this.state;
335
338
 
336
339
  const { onColorRemoveClick } = this.props;
337
340
 
@@ -377,7 +380,7 @@ class ImageColorize extends React.Component {
377
380
  ))}
378
381
  </Select>
379
382
  </AnalyticsWrapper>
380
- {imageColorsWereEdited && (
383
+ {(imageColorsWereEdited || vectorizeRequested) && (
381
384
  <Button
382
385
  variant="outlined"
383
386
  onClick={this.resetImageState}
@@ -267,6 +267,9 @@ export default class VisualizationService extends AbstractVisualizationService {
267
267
  const visualizationOverlayMode = getConf('visualizationOverlayMode');
268
268
  sendMessage(component, 'setOverlayMode', !!visualizationOverlayMode);
269
269
 
270
+ const visualizationOptions = getConf('visualization.options');
271
+ sendMessage(component, 'setOptions', visualizationOptions);
272
+
270
273
  this.observable.dispatch(EventTypes.ComponentChange, { component });
271
274
 
272
275
  return this;
@@ -10,6 +10,7 @@ const styles = theme => ({
10
10
  cardPriceOverview: {
11
11
  fontSize: 12,
12
12
  boxShadow: 'none',
13
+ overflow: 'initial',
13
14
 
14
15
  [theme.breakpoints.down('md')]: {
15
16
  boxShadow: 'none',
@@ -181,6 +181,13 @@ let applicationConfiguration = {
181
181
 
182
182
  visualization: {
183
183
  designAreaHighlightBackgroundColor: 'transparent',
184
+ options: {
185
+ // when zoom = 1 use NearestFilter (for sharper product image)
186
+ sharperFullView: false,
187
+ // upscale or downscale the product image to fit 2048 x 2048
188
+ // Warning! not recommended, use better image resources instead
189
+ optimizeProductImage: false,
190
+ },
184
191
  },
185
192
 
186
193
  designer: {