@configuratorware/configurator-frontendgui 1.31.1 → 1.31.4
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/Designer/Components/ImageEditDialog/ImageUpload.js +5 -3
- package/App/Reducers/Configurator/Actions.js +20 -81
- package/App/Reducers/ImageGallery/Reducer.js +7 -4
- package/App/Screens/Configurator/ThemeProvider.js +1 -1
- package/App/Services/DesignerService.js +8 -1
- package/App/{Screens/Configurator/Containers/DesignApproval.js → Shared/Components/AcceptPrivacy/index.js} +78 -71
- package/App/Shared/Components/AddToBasket/index.js +1 -1
- package/App/Shared/Components/AmountPrice/index.js +83 -49
- package/App/Shared/Components/PriceOverview/index.js +5 -3
- package/App/Shared/Components/ReceiveOfferForm/index.js +9 -10
- package/App/configuration.js +4 -2
- package/package.json +4 -4
- package/public/translations/de_DE.json +4 -1
- package/public/translations/en_GB.json +10 -5
- package/src/App/Modules/Designer/Components/ImageEditDialog/ImageUpload.js +4 -3
- package/src/App/Reducers/Configurator/Actions.js +6 -37
- package/src/App/Reducers/ImageGallery/Reducer.js +5 -1
- package/src/App/Screens/Configurator/ThemeProvider.js +2 -2
- package/src/App/Services/DesignerService.js +7 -0
- package/src/App/Shared/Components/AcceptPrivacy/index.js +78 -0
- package/src/App/Shared/Components/AddToBasket/index.js +1 -1
- package/src/App/Shared/Components/AmountPrice/index.js +48 -3
- package/src/App/Shared/Components/PriceOverview/index.js +3 -0
- package/src/App/Shared/Components/ReceiveOfferForm/__snapshots__/index.test.jsx.snap +64 -64
- package/src/App/Shared/Components/ReceiveOfferForm/index.js +9 -10
- package/src/App/configuration.js +14 -0
- package/App/Screens/Configurator/Components/DesignApproval/index.js +0 -76
- package/App/Screens/Configurator/Components/DesignApproval/index.story.js +0 -27
- package/App/Screens/Configurator/Components/DesignApproval/index.test.js +0 -31
- package/src/App/Screens/Configurator/Components/DesignApproval/__snapshots__/index.test.jsx.snap +0 -91
- package/src/App/Screens/Configurator/Components/DesignApproval/index.js +0 -54
- package/src/App/Screens/Configurator/Components/DesignApproval/index.story.js +0 -12
- package/src/App/Screens/Configurator/Components/DesignApproval/index.test.jsx +0 -17
- package/src/App/Screens/Configurator/Containers/DesignApproval.js +0 -76
|
@@ -71,6 +71,8 @@ var _LoadingOverlay = _interopRequireDefault(require("../../../../Framework/Comp
|
|
|
71
71
|
|
|
72
72
|
var _core = require("@material-ui/core");
|
|
73
73
|
|
|
74
|
+
var _AcceptPrivacy = _interopRequireDefault(require("../AcceptPrivacy"));
|
|
75
|
+
|
|
74
76
|
var _excluded = ["onTouchMove"],
|
|
75
77
|
_excluded2 = ["wrapperClass", "renderPriceBox"];
|
|
76
78
|
|
|
@@ -346,7 +348,8 @@ var AmountPrice = /*#__PURE__*/function (_React$Component) {
|
|
|
346
348
|
error: null
|
|
347
349
|
},
|
|
348
350
|
inView: true,
|
|
349
|
-
showErrors: false
|
|
351
|
+
showErrors: false,
|
|
352
|
+
dataPrivacyAccepted: false
|
|
350
353
|
});
|
|
351
354
|
|
|
352
355
|
_defineProperty(_assertThisInitialized(_this), "receiveOfferFormComponentRef", /*#__PURE__*/_react["default"].createRef());
|
|
@@ -388,6 +391,15 @@ var AmountPrice = /*#__PURE__*/function (_React$Component) {
|
|
|
388
391
|
}
|
|
389
392
|
});
|
|
390
393
|
}
|
|
394
|
+
|
|
395
|
+
if (!_this.dataPrivacyApproved()) {
|
|
396
|
+
_this.setState({
|
|
397
|
+
dataPrivacyAccepted: {
|
|
398
|
+
value: false,
|
|
399
|
+
error: true
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
}
|
|
391
403
|
});
|
|
392
404
|
|
|
393
405
|
_defineProperty(_assertThisInitialized(_this), "requestHasErrors", function () {
|
|
@@ -396,7 +408,7 @@ var AmountPrice = /*#__PURE__*/function (_React$Component) {
|
|
|
396
408
|
displayAcceptDesign = _this$props2.displayAcceptDesign;
|
|
397
409
|
var designApproved = _this.state.approval.value;
|
|
398
410
|
|
|
399
|
-
if (bulkNameErrors && bulkNameErrors.length > 0 || displayAcceptDesign && !designApproved) {
|
|
411
|
+
if (bulkNameErrors && bulkNameErrors.length > 0 || displayAcceptDesign && !designApproved || !_this.dataPrivacyApproved()) {
|
|
400
412
|
return true;
|
|
401
413
|
}
|
|
402
414
|
|
|
@@ -413,6 +425,15 @@ var AmountPrice = /*#__PURE__*/function (_React$Component) {
|
|
|
413
425
|
}
|
|
414
426
|
});
|
|
415
427
|
|
|
428
|
+
_defineProperty(_assertThisInitialized(_this), "dataPrivacyApproved", function () {
|
|
429
|
+
var _this$props3 = _this.props,
|
|
430
|
+
showReceiveOfferForm = _this$props3.showReceiveOfferForm,
|
|
431
|
+
clientTexts = _this$props3.clientTexts;
|
|
432
|
+
var dataPrivacyLink = clientTexts.dataPrivacyLink;
|
|
433
|
+
var dataPrivacyApproved = _this.state.dataPrivacyAccepted.value;
|
|
434
|
+
return showReceiveOfferForm && dataPrivacyApproved && dataPrivacyLink;
|
|
435
|
+
});
|
|
436
|
+
|
|
416
437
|
_defineProperty(_assertThisInitialized(_this), "handleTouchMove", function (evt) {
|
|
417
438
|
var dialogContent = _this.dialogContentRef.current;
|
|
418
439
|
evt.preventDefault();
|
|
@@ -554,18 +575,18 @@ var AmountPrice = /*#__PURE__*/function (_React$Component) {
|
|
|
554
575
|
});
|
|
555
576
|
|
|
556
577
|
_defineProperty(_assertThisInitialized(_this), "renderDefaultPriceBox", function () {
|
|
557
|
-
var _this$
|
|
558
|
-
classes = _this$
|
|
559
|
-
amount = _this$
|
|
560
|
-
boxed = _this$
|
|
561
|
-
priceFormatted = _this$
|
|
562
|
-
hidePrices = _this$
|
|
563
|
-
hidePieces = _this$
|
|
564
|
-
vatNotice = _this$
|
|
565
|
-
showReceiveOfferForm = _this$
|
|
566
|
-
showCallToAction = _this$
|
|
567
|
-
showConfigurationModeSwitch = _this$
|
|
568
|
-
ConfigurationModeSwitchComponent = _this$
|
|
578
|
+
var _this$props4 = _this.props,
|
|
579
|
+
classes = _this$props4.classes,
|
|
580
|
+
amount = _this$props4.amount,
|
|
581
|
+
boxed = _this$props4.boxed,
|
|
582
|
+
priceFormatted = _this$props4.priceFormatted,
|
|
583
|
+
hidePrices = _this$props4.hidePrices,
|
|
584
|
+
hidePieces = _this$props4.hidePieces,
|
|
585
|
+
vatNotice = _this$props4.vatNotice,
|
|
586
|
+
showReceiveOfferForm = _this$props4.showReceiveOfferForm,
|
|
587
|
+
showCallToAction = _this$props4.showCallToAction,
|
|
588
|
+
showConfigurationModeSwitch = _this$props4.showConfigurationModeSwitch,
|
|
589
|
+
ConfigurationModeSwitchComponent = _this$props4.ConfigurationModeSwitchComponent;
|
|
569
590
|
var boxStyle = boxed ? classes.card : classes.cardUnboxed;
|
|
570
591
|
return /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
571
592
|
className: (0, _clsx["default"])(boxStyle, (0, _customClassName["default"])('cta-box'))
|
|
@@ -653,9 +674,9 @@ var AmountPrice = /*#__PURE__*/function (_React$Component) {
|
|
|
653
674
|
_createClass(AmountPrice, [{
|
|
654
675
|
key: "componentDidUpdate",
|
|
655
676
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
656
|
-
var _this$
|
|
657
|
-
error = _this$
|
|
658
|
-
bulkNameErrors = _this$
|
|
677
|
+
var _this$props5 = this.props,
|
|
678
|
+
error = _this$props5.error,
|
|
679
|
+
bulkNameErrors = _this$props5.bulkNameErrors;
|
|
659
680
|
|
|
660
681
|
if (error && !(0, _isEqual["default"])(error, prevProps.error) && this.dialogContentRef.current) {
|
|
661
682
|
this.dialogContentRef.current.scrollTo(0, 0);
|
|
@@ -695,32 +716,35 @@ var AmountPrice = /*#__PURE__*/function (_React$Component) {
|
|
|
695
716
|
approval = _this$state.approval,
|
|
696
717
|
inView = _this$state.inView,
|
|
697
718
|
showErrors = _this$state.showErrors,
|
|
698
|
-
bulkNameErrors = _this$state.bulkNameErrors
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
719
|
+
bulkNameErrors = _this$state.bulkNameErrors,
|
|
720
|
+
dataPrivacyAccepted = _this$state.dataPrivacyAccepted;
|
|
721
|
+
var _this$props6 = this.props,
|
|
722
|
+
amount = _this$props6.amount,
|
|
723
|
+
priceList = _this$props6.priceList,
|
|
724
|
+
priceFormatted = _this$props6.priceFormatted,
|
|
725
|
+
onSelectableChanged = _this$props6.onSelectableChanged,
|
|
726
|
+
showProductVariants = _this$props6.showProductVariants,
|
|
727
|
+
ProductVariantComponent = _this$props6.ProductVariantComponent,
|
|
728
|
+
error = _this$props6.error,
|
|
729
|
+
width = _this$props6.width,
|
|
730
|
+
hidePrices = _this$props6.hidePrices,
|
|
731
|
+
title = _this$props6.title,
|
|
732
|
+
classes = _this$props6.classes,
|
|
733
|
+
showReceiveOfferForm = _this$props6.showReceiveOfferForm,
|
|
734
|
+
vatNotice = _this$props6.vatNotice,
|
|
735
|
+
clientTexts = _this$props6.clientTexts,
|
|
736
|
+
displayAcceptDesign = _this$props6.displayAcceptDesign,
|
|
737
|
+
notifications = _this$props6.notifications,
|
|
738
|
+
showCallToAction = _this$props6.showCallToAction,
|
|
739
|
+
ReceiveOfferFormComponent = _this$props6.ReceiveOfferFormComponent,
|
|
740
|
+
AcceptDesignComponent = _this$props6.AcceptDesignComponent,
|
|
741
|
+
PriceOverviewComponent = _this$props6.PriceOverviewComponent,
|
|
742
|
+
NotificationComponent = _this$props6.NotificationComponent,
|
|
743
|
+
PriceListComponent = _this$props6.PriceListComponent,
|
|
744
|
+
AddToCartComponent = _this$props6.AddToCartComponent,
|
|
745
|
+
AcceptPrivacyComponent = _this$props6.AcceptPrivacyComponent;
|
|
746
|
+
var termsAndConditionsLink = clientTexts.termsAndConditionsLink,
|
|
747
|
+
dataPrivacyLink = clientTexts.dataPrivacyLink;
|
|
724
748
|
var mergedNotifications = _toConsumableArray(notifications) || [];
|
|
725
749
|
|
|
726
750
|
if (showErrors && bulkNameErrors && bulkNameErrors.length > 0) {
|
|
@@ -785,6 +809,14 @@ var AmountPrice = /*#__PURE__*/function (_React$Component) {
|
|
|
785
809
|
noteLabel: (0, _i18n.t)('amountPrice.notice'),
|
|
786
810
|
handleChange: this.handleBasketNoticeChange
|
|
787
811
|
}) : null,
|
|
812
|
+
acceptDataPrivacyComponent: showReceiveOfferForm && dataPrivacyLink ? /*#__PURE__*/_react["default"].createElement(AcceptPrivacyComponent, {
|
|
813
|
+
dataPrivacyLink: dataPrivacyLink,
|
|
814
|
+
displayAcceptDesign: true,
|
|
815
|
+
handleChangeCheckboxApproval: this.handleChange,
|
|
816
|
+
approval: dataPrivacyAccepted,
|
|
817
|
+
closeProductOverviewDialog: this.handleClose,
|
|
818
|
+
displayNote: false
|
|
819
|
+
}) : null,
|
|
788
820
|
notificationComponent: mergedNotifications.map(function (_ref4, key) {
|
|
789
821
|
var message = _ref4.message,
|
|
790
822
|
level = _ref4.level,
|
|
@@ -839,10 +871,10 @@ var AmountPrice = /*#__PURE__*/function (_React$Component) {
|
|
|
839
871
|
}, {
|
|
840
872
|
key: "render",
|
|
841
873
|
value: function render() {
|
|
842
|
-
var _this$
|
|
843
|
-
wrapperClass = _this$
|
|
844
|
-
renderPriceBox = _this$
|
|
845
|
-
props = _objectWithoutProperties(_this$
|
|
874
|
+
var _this$props7 = this.props,
|
|
875
|
+
wrapperClass = _this$props7.wrapperClass,
|
|
876
|
+
renderPriceBox = _this$props7.renderPriceBox,
|
|
877
|
+
props = _objectWithoutProperties(_this$props7, _excluded2);
|
|
846
878
|
|
|
847
879
|
var showPriceOverview = this.state.showPriceOverview;
|
|
848
880
|
var openPriceOverview = this.openPriceOverview,
|
|
@@ -899,7 +931,8 @@ _defineProperty(AmountPrice, "propTypes", {
|
|
|
899
931
|
PriceListComponent: _propTypes["default"].elementType,
|
|
900
932
|
AddToCartComponent: _propTypes["default"].elementType,
|
|
901
933
|
renderPriceBox: _propTypes["default"].func,
|
|
902
|
-
userComment: _propTypes["default"].string
|
|
934
|
+
userComment: _propTypes["default"].string,
|
|
935
|
+
AcceptPrivacyComponent: _propTypes["default"].elementType
|
|
903
936
|
});
|
|
904
937
|
|
|
905
938
|
_defineProperty(AmountPrice, "defaultProps", {
|
|
@@ -915,7 +948,8 @@ _defineProperty(AmountPrice, "defaultProps", {
|
|
|
915
948
|
PriceOverviewComponent: _PriceOverview["default"],
|
|
916
949
|
NotificationComponent: _Notification["default"],
|
|
917
950
|
PriceListComponent: _PriceList["default"],
|
|
918
|
-
AddToCartComponent: _AddToBasket["default"]
|
|
951
|
+
AddToCartComponent: _AddToBasket["default"],
|
|
952
|
+
AcceptPrivacyComponent: _AcceptPrivacy["default"]
|
|
919
953
|
});
|
|
920
954
|
|
|
921
955
|
var _default = (0, _withWidth["default"])()((0, _styles.withStyles)(styles, {
|
|
@@ -97,7 +97,8 @@ var PriceOverview = /*#__PURE__*/function (_React$Component) {
|
|
|
97
97
|
receiveOfferFormComponent = _this$props.receiveOfferFormComponent,
|
|
98
98
|
showReceiveOfferForm = _this$props.showReceiveOfferForm,
|
|
99
99
|
amount = _this$props.amount,
|
|
100
|
-
acceptDesignComponent = _this$props.acceptDesignComponent
|
|
100
|
+
acceptDesignComponent = _this$props.acceptDesignComponent,
|
|
101
|
+
acceptDataPrivacyComponent = _this$props.acceptDataPrivacyComponent;
|
|
101
102
|
return /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
102
103
|
item: true,
|
|
103
104
|
xs: 12,
|
|
@@ -124,7 +125,7 @@ var PriceOverview = /*#__PURE__*/function (_React$Component) {
|
|
|
124
125
|
}, /*#__PURE__*/_react["default"].createElement("b", null, contactData)), receiveOfferFormComponent), /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
125
126
|
item: true,
|
|
126
127
|
xs: 12
|
|
127
|
-
}, acceptDesignComponent, amount > 0 && /*#__PURE__*/_react["default"].createElement(_Divider["default"], null), priceListComponent), /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
128
|
+
}, acceptDesignComponent, acceptDataPrivacyComponent, amount > 0 && /*#__PURE__*/_react["default"].createElement(_Divider["default"], null), priceListComponent), /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
128
129
|
item: true,
|
|
129
130
|
xs: 12
|
|
130
131
|
}, addToCartComponent && /*#__PURE__*/_react["default"].createElement(_Divider["default"], null), addToCartComponent)), !showReceiveOfferForm && /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
@@ -167,7 +168,8 @@ _defineProperty(PriceOverview, "propTypes", {
|
|
|
167
168
|
receiveOfferFormComponent: _propTypes["default"].element,
|
|
168
169
|
showReceiveOfferForm: _propTypes["default"].bool,
|
|
169
170
|
amount: _propTypes["default"].number,
|
|
170
|
-
acceptDesignComponent: _propTypes["default"].element
|
|
171
|
+
acceptDesignComponent: _propTypes["default"].element,
|
|
172
|
+
acceptDataPrivacyComponent: _propTypes["default"].element
|
|
171
173
|
});
|
|
172
174
|
|
|
173
175
|
var _default = (0, _styles.withStyles)(styles, {
|
|
@@ -58,7 +58,7 @@ var styles = function styles(theme) {
|
|
|
58
58
|
marginTop: 0
|
|
59
59
|
},
|
|
60
60
|
outlinedInput: _defineProperty({
|
|
61
|
-
padding:
|
|
61
|
+
padding: 10,
|
|
62
62
|
fontSize: 15
|
|
63
63
|
}, theme.breakpoints.down('xs'), {
|
|
64
64
|
padding: 19
|
|
@@ -143,7 +143,6 @@ var ReceiveOfferForm = /*#__PURE__*/function (_React$Component) {
|
|
|
143
143
|
_this.handleChange = _this.handleChange.bind(_assertThisInitialized(_this));
|
|
144
144
|
_this.handleBlur = _this.handleBlur.bind(_assertThisInitialized(_this));
|
|
145
145
|
_this.setInputRef = _this.setInputRef.bind(_assertThisInitialized(_this));
|
|
146
|
-
_this.designApprovalRef = /*#__PURE__*/_react["default"].createRef();
|
|
147
146
|
return _this;
|
|
148
147
|
}
|
|
149
148
|
|
|
@@ -231,7 +230,7 @@ var ReceiveOfferForm = /*#__PURE__*/function (_React$Component) {
|
|
|
231
230
|
onChange: this.handleChange,
|
|
232
231
|
onBlur: this.handleBlur,
|
|
233
232
|
label: (0, _i18n.t)('receiveOfferForm.email'),
|
|
234
|
-
margin: "
|
|
233
|
+
margin: "dense",
|
|
235
234
|
variant: "outlined",
|
|
236
235
|
fullWidth: true,
|
|
237
236
|
error: !!email.error,
|
|
@@ -256,7 +255,7 @@ var ReceiveOfferForm = /*#__PURE__*/function (_React$Component) {
|
|
|
256
255
|
onChange: this.handleChange,
|
|
257
256
|
onBlur: this.handleBlur,
|
|
258
257
|
label: (0, _i18n.t)('receiveOfferForm.name'),
|
|
259
|
-
margin: "
|
|
258
|
+
margin: "dense",
|
|
260
259
|
variant: "outlined",
|
|
261
260
|
fullWidth: true,
|
|
262
261
|
error: !!name.error,
|
|
@@ -278,7 +277,7 @@ var ReceiveOfferForm = /*#__PURE__*/function (_React$Component) {
|
|
|
278
277
|
onChange: this.handleChange,
|
|
279
278
|
onBlur: this.handleBlur,
|
|
280
279
|
label: (0, _i18n.t)('receiveOfferForm.company'),
|
|
281
|
-
margin: "
|
|
280
|
+
margin: "dense",
|
|
282
281
|
variant: "outlined",
|
|
283
282
|
fullWidth: true,
|
|
284
283
|
error: !!company.error,
|
|
@@ -300,7 +299,7 @@ var ReceiveOfferForm = /*#__PURE__*/function (_React$Component) {
|
|
|
300
299
|
onChange: this.handleChange,
|
|
301
300
|
onBlur: this.handleBlur,
|
|
302
301
|
label: (0, _i18n.t)('receiveOfferForm.phonenumber'),
|
|
303
|
-
margin: "
|
|
302
|
+
margin: "dense",
|
|
304
303
|
variant: "outlined",
|
|
305
304
|
fullWidth: true,
|
|
306
305
|
error: !!phonenumber.error,
|
|
@@ -329,7 +328,7 @@ var ReceiveOfferForm = /*#__PURE__*/function (_React$Component) {
|
|
|
329
328
|
onChange: this.handleChange,
|
|
330
329
|
onBlur: this.handleBlur,
|
|
331
330
|
label: (0, _i18n.t)('receiveOfferForm.zip'),
|
|
332
|
-
margin: "
|
|
331
|
+
margin: "dense",
|
|
333
332
|
variant: "outlined",
|
|
334
333
|
fullWidth: true,
|
|
335
334
|
error: !!zip.error,
|
|
@@ -355,7 +354,7 @@ var ReceiveOfferForm = /*#__PURE__*/function (_React$Component) {
|
|
|
355
354
|
onChange: this.handleChange,
|
|
356
355
|
onBlur: this.handleBlur,
|
|
357
356
|
label: (0, _i18n.t)('receiveOfferForm.city'),
|
|
358
|
-
margin: "
|
|
357
|
+
margin: "dense",
|
|
359
358
|
variant: "outlined",
|
|
360
359
|
fullWidth: true,
|
|
361
360
|
error: !!city.error,
|
|
@@ -377,7 +376,7 @@ var ReceiveOfferForm = /*#__PURE__*/function (_React$Component) {
|
|
|
377
376
|
onChange: this.handleChange,
|
|
378
377
|
onBlur: this.handleBlur,
|
|
379
378
|
label: (0, _i18n.t)('receiveOfferForm.street'),
|
|
380
|
-
margin: "
|
|
379
|
+
margin: "dense",
|
|
381
380
|
variant: "outlined",
|
|
382
381
|
fullWidth: true,
|
|
383
382
|
error: !!street.error,
|
|
@@ -399,7 +398,7 @@ var ReceiveOfferForm = /*#__PURE__*/function (_React$Component) {
|
|
|
399
398
|
onChange: this.handleChange,
|
|
400
399
|
onBlur: this.handleBlur,
|
|
401
400
|
label: (0, _i18n.t)('receiveOfferForm.country'),
|
|
402
|
-
margin: "
|
|
401
|
+
margin: "dense",
|
|
403
402
|
variant: "outlined",
|
|
404
403
|
fullWidth: true,
|
|
405
404
|
error: !!country.error,
|
package/App/configuration.js
CHANGED
|
@@ -169,8 +169,10 @@ var applicationConfiguration = {
|
|
|
169
169
|
designer: {
|
|
170
170
|
dpi: 300,
|
|
171
171
|
// the default canvas dpi as project specific option
|
|
172
|
-
maxColorAmount: 10
|
|
173
|
-
|
|
172
|
+
maxColorAmount: 10,
|
|
173
|
+
// the default max number of colors in the colorizing feature
|
|
174
|
+
allowedImageUploadFormats: [// the image formats users can upload to designareas / designer items
|
|
175
|
+
'jpg', 'jpeg', 'svg', 'png', 'pdf', 'bmp', 'tif', 'tiff', 'eps', 'ai', 'gif']
|
|
174
176
|
},
|
|
175
177
|
vectorizeImageQuality: 45000,
|
|
176
178
|
renderPreviewImagesForCheckout: true,
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configuratorware/configurator-frontendgui",
|
|
3
|
-
"version": "1.31.
|
|
3
|
+
"version": "1.31.4",
|
|
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.
|
|
9
|
+
"@configuratorware/scripts": "1.31.4",
|
|
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.
|
|
43
|
-
"redhotmagma-visualization": "1.31.
|
|
42
|
+
"redhotmagma-graphics-editor": "1.31.4",
|
|
43
|
+
"redhotmagma-visualization": "1.31.4",
|
|
44
44
|
"redux": "^4.1.0",
|
|
45
45
|
"redux-logger": "^3.0.6",
|
|
46
46
|
"redux-persist": "^5.10.0",
|
|
@@ -158,7 +158,10 @@
|
|
|
158
158
|
"checkInputsInForm": "Bitte Eingaben im Formular prüfen",
|
|
159
159
|
"sentOk": "Anfrage wurde erfolgreich versandt.",
|
|
160
160
|
"sentError": "Fehler beim Senden der Anfrage.",
|
|
161
|
-
"sendButton": "Angebot anfordern"
|
|
161
|
+
"sendButton": "Angebot anfordern",
|
|
162
|
+
"privacyNotice": "Ich willige darin ein, dass die von mir überreichten Informationen und Kontaktdaten dazu verwendet werden, um mit mir anlässlich meiner Kontaktaufnahme in Verbindung zu treten, hierüber zu kommunizieren und meine Anfrage abzuwickeln. Dies gilt insbesondere für die Verwendung der E-Mail-Adresse zum vorgenannten Zweck. Die Einwilligung kann jederzeit mit Wirkung für die Zukunft per E-Mail widerrufen werden. Die Datenschutzerklärung kann %{privacyLink} eingesehen werden.",
|
|
163
|
+
"privacyLinkLabel": "hier",
|
|
164
|
+
"selectionError": "Checkbox nicht bestätigt"
|
|
162
165
|
},
|
|
163
166
|
"acceptDesignScreen": {
|
|
164
167
|
"selectionError": "Checkbox nicht bestätigt",
|
|
@@ -63,9 +63,8 @@
|
|
|
63
63
|
},
|
|
64
64
|
"productVariant": {
|
|
65
65
|
"amountChosen": "chosen: ",
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"editDesign": "Edit design",
|
|
66
|
+
"chooseSize": "Choose size",
|
|
67
|
+
"adaptSizes": "Adapt sizes",
|
|
69
68
|
"confirmSelection": "Confirm selection",
|
|
70
69
|
"amountLabel": "Amount"
|
|
71
70
|
},
|
|
@@ -159,7 +158,10 @@
|
|
|
159
158
|
"checkInputsInForm": "Please check the form inputs below",
|
|
160
159
|
"sentOk": "Request was successfully sent.",
|
|
161
160
|
"sentError": "Error sending the request.",
|
|
162
|
-
"sendButton": "Request a quote"
|
|
161
|
+
"sendButton": "Request a quote",
|
|
162
|
+
"privacyNotice": "I consent to the information and contact details I have provided being used to contact me, to communicate about and to process my request. This applies in particular to the use of the e-mail address for the aforementioned purpose. The consent can be revoked at any time with effect for the future by e-mail. The privacy policy can be viewed %{privacyLink}.",
|
|
163
|
+
"privacyLinkLabel": "here",
|
|
164
|
+
"selectionError": "No consent given"
|
|
163
165
|
},
|
|
164
166
|
"acceptDesignScreen": {
|
|
165
167
|
"checkedSelectionActive": "I have checked all provided data and the design and I approve the configuration",
|
|
@@ -183,7 +185,6 @@
|
|
|
183
185
|
"missingVariantError": "The selected item %{selectedVariant} is no longer available.",
|
|
184
186
|
"errorDialogTitle": "Notice",
|
|
185
187
|
"clientValidationError": "No valid channel/client combination found!",
|
|
186
|
-
"alertDialogTitle": "Alert",
|
|
187
188
|
"okButtonLabel": "Ok",
|
|
188
189
|
"cancelButtonLabel": "Cancel",
|
|
189
190
|
"designAreaControlBox": {
|
|
@@ -412,6 +413,10 @@
|
|
|
412
413
|
"okButton": "Ok",
|
|
413
414
|
"cancelButton": "Cancel",
|
|
414
415
|
"rules": {
|
|
416
|
+
"itemattributematch": {
|
|
417
|
+
"text": "The selection does not match the following parts in the configuration.",
|
|
418
|
+
"resolveText": "These options will be removed:"
|
|
419
|
+
},
|
|
415
420
|
"optionexclusion": {
|
|
416
421
|
"text": "The selection does not match the following parts in the configuration.",
|
|
417
422
|
"resolveText": "These options will be removed:"
|
|
@@ -15,6 +15,7 @@ import Button from '@material-ui/core/Button';
|
|
|
15
15
|
import MainButton from 'Shared/Components/MainButton';
|
|
16
16
|
import { Services } from 'App/ServiceLocator';
|
|
17
17
|
import withWidth, { isWidthDown } from '@material-ui/core/withWidth/withWidth';
|
|
18
|
+
import { getConf } from '../../../../configuration';
|
|
18
19
|
|
|
19
20
|
const styles = theme => ({
|
|
20
21
|
imagePreview: {
|
|
@@ -208,7 +209,7 @@ class ImageEditDialog extends React.Component {
|
|
|
208
209
|
|
|
209
210
|
const extension = file.name.toLowerCase().match(/\.([0-9a-z]+)$/i)[1];
|
|
210
211
|
|
|
211
|
-
const allowedFormats =
|
|
212
|
+
const allowedFormats = getConf('designer.allowedImageUploadFormats');
|
|
212
213
|
|
|
213
214
|
if (allowedFormats.indexOf(extension) === -1) {
|
|
214
215
|
error = t('fileUpload.uploadFormatError', { formats: allowedFormats.join(', ').toUpperCase() });
|
|
@@ -221,8 +222,8 @@ class ImageEditDialog extends React.Component {
|
|
|
221
222
|
error,
|
|
222
223
|
imageData: null,
|
|
223
224
|
});
|
|
224
|
-
const
|
|
225
|
-
const isRenderable =
|
|
225
|
+
const renderableFormats = ['jpg', 'jpeg', 'svg', 'png', 'bmp', 'gif'];
|
|
226
|
+
const isRenderable = renderableFormats.indexOf(extension) !== -1;
|
|
226
227
|
if (isRenderable && file.type && file.type.match('image.*')) {
|
|
227
228
|
const reader = new FileReader();
|
|
228
229
|
reader.onload = e => {
|
|
@@ -480,14 +480,14 @@ export const fetchOptions = (itemidentifier, optionclassification, configuration
|
|
|
480
480
|
);
|
|
481
481
|
};
|
|
482
482
|
|
|
483
|
-
export const switchOptionsBasic = (configuration,
|
|
483
|
+
export const switchOptionsBasic = (configuration, switchedOptions, noCheck = false) => {
|
|
484
484
|
const config = {};
|
|
485
485
|
if (noCheck) {
|
|
486
486
|
config.params = { nocheck: 1 };
|
|
487
487
|
}
|
|
488
488
|
return apiActions.postData(
|
|
489
489
|
'configuration/switchoption',
|
|
490
|
-
{ configuration,
|
|
490
|
+
{ configuration, switchedOptions },
|
|
491
491
|
data => ({
|
|
492
492
|
// dummy receiver
|
|
493
493
|
type: 'RECEIVE_SWITCHOPTIONSRESULT_BASIC',
|
|
@@ -497,37 +497,6 @@ export const switchOptionsBasic = (configuration, switchedoptions, noCheck = fal
|
|
|
497
497
|
);
|
|
498
498
|
};
|
|
499
499
|
|
|
500
|
-
export const switchOptionArrays = (configuration, switchOptionData, noCheck = false) => dispatch => {
|
|
501
|
-
const switchedoptions = {};
|
|
502
|
-
const afterSwitch = [];
|
|
503
|
-
|
|
504
|
-
for (const componentIdentifier in switchOptionData) {
|
|
505
|
-
if (isArray(switchOptionData[componentIdentifier])) {
|
|
506
|
-
const [firstOption, ...otherOptions] = switchOptionData[componentIdentifier];
|
|
507
|
-
|
|
508
|
-
switchedoptions[componentIdentifier] = firstOption;
|
|
509
|
-
|
|
510
|
-
if (otherOptions.length > 0) {
|
|
511
|
-
for (let optionData of otherOptions) {
|
|
512
|
-
afterSwitch.push({
|
|
513
|
-
[componentIdentifier]: optionData,
|
|
514
|
-
});
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
} else {
|
|
518
|
-
switchedoptions[componentIdentifier] = switchOptionData[componentIdentifier];
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
let p = dispatch(switchOptionsBasic(configuration, switchedoptions, noCheck));
|
|
523
|
-
for (let switchOption of afterSwitch) {
|
|
524
|
-
p = p.then(action => {
|
|
525
|
-
return dispatch(switchOptionsBasic(action.data, switchOption, noCheck));
|
|
526
|
-
});
|
|
527
|
-
}
|
|
528
|
-
return p;
|
|
529
|
-
};
|
|
530
|
-
|
|
531
500
|
export const switchOptions = (
|
|
532
501
|
configuration,
|
|
533
502
|
switchOptionData,
|
|
@@ -535,7 +504,7 @@ export const switchOptions = (
|
|
|
535
504
|
refreshOptions = false,
|
|
536
505
|
setChecked = false
|
|
537
506
|
) => dispatch => {
|
|
538
|
-
return dispatch(
|
|
507
|
+
return dispatch(switchOptionsBasic(configuration, switchOptionData, noCheck)).then(action => {
|
|
539
508
|
const extraData = { switchOptionData, noCheck, refreshOptions, setChecked };
|
|
540
509
|
return dispatch(receiveSwitchoptionsresult(action.data, extraData));
|
|
541
510
|
});
|
|
@@ -701,10 +670,10 @@ export const resolveConflicts = () => (dispatch, getState) => {
|
|
|
701
670
|
if (switchOptionsData) {
|
|
702
671
|
if (p) {
|
|
703
672
|
p = p.then(action => {
|
|
704
|
-
return dispatch(
|
|
673
|
+
return dispatch(switchOptionsBasic(action.data, switchOptionsData, true));
|
|
705
674
|
});
|
|
706
675
|
} else {
|
|
707
|
-
p = dispatch(
|
|
676
|
+
p = dispatch(switchOptionsBasic(configuration, switchOptionsData, true));
|
|
708
677
|
}
|
|
709
678
|
}
|
|
710
679
|
}
|
|
@@ -781,7 +750,7 @@ export const selectMultipleOptions = optionsList => (dispatch, getState) => {
|
|
|
781
750
|
for (const component of optionsList) {
|
|
782
751
|
switchOptionData[component.identifier] = component.selectedoptions.map(({ identifier, amount }) => ({
|
|
783
752
|
identifier,
|
|
784
|
-
amount: amount
|
|
753
|
+
amount: typeof amount === 'undefined' ? 1 : amount,
|
|
785
754
|
check_results: null,
|
|
786
755
|
}));
|
|
787
756
|
}
|
|
@@ -133,7 +133,11 @@ export function imageGalleryReducer(state = initialState, action = {}) {
|
|
|
133
133
|
selectedImage: currentImage,
|
|
134
134
|
};
|
|
135
135
|
} else {
|
|
136
|
-
|
|
136
|
+
const idx = userImages.indexOf(currentImage);
|
|
137
|
+
userImages[idx] = {
|
|
138
|
+
...currentImage,
|
|
139
|
+
...selectedImage,
|
|
140
|
+
};
|
|
137
141
|
return {
|
|
138
142
|
...state,
|
|
139
143
|
userImages,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { connect } from 'react-redux';
|
|
4
|
-
import { MuiThemeProvider,
|
|
4
|
+
import { MuiThemeProvider, createTheme } from '@material-ui/core/styles';
|
|
5
5
|
import { grey } from '@material-ui/core/colors';
|
|
6
6
|
import merge from 'lodash/merge';
|
|
7
7
|
import cloneDeep from 'lodash/cloneDeep';
|
|
@@ -245,7 +245,7 @@ const mapStateToProps = state => ({
|
|
|
245
245
|
|
|
246
246
|
export const ThemeMixer = ({ client, customTheme, withTheme, children }) => {
|
|
247
247
|
const themeMix = useMemo(() => {
|
|
248
|
-
const theme =
|
|
248
|
+
const theme = createTheme(
|
|
249
249
|
createThemeFromClientTheme(client && client.theme ? client.theme : {}, customTheme || {})
|
|
250
250
|
);
|
|
251
251
|
if (typeof withTheme === 'function') {
|
|
@@ -36,11 +36,18 @@ import { createTextPlaceholder } from '../Reducers/ImageGallery/Modifiers';
|
|
|
36
36
|
import { updateLinkedImagesWithImageData } from '../Reducers/DesignData/Actions';
|
|
37
37
|
import { checkDesignElementRestrictions } from '../Reducers/DesignArea/DesignElementSelectors';
|
|
38
38
|
|
|
39
|
+
function getCanvasImageScalingWithImageData(canvasImage, imageData) {
|
|
40
|
+
const currentPreview = canvasImage.imageData.preview;
|
|
41
|
+
const nextPreview = imageData.preview;
|
|
42
|
+
return canvasImage.scaling * (currentPreview.width / nextPreview.width);
|
|
43
|
+
}
|
|
44
|
+
|
|
39
45
|
function updateCanvasImageWithImageData(canvasImage, imageData) {
|
|
40
46
|
return canvasImage.updateOptions(
|
|
41
47
|
prepareImageObjectData({
|
|
42
48
|
imageData,
|
|
43
49
|
src: `${getConf('network.host')}${imageData.preview.url}`,
|
|
50
|
+
scaling: getCanvasImageScalingWithImageData(canvasImage, imageData),
|
|
44
51
|
})
|
|
45
52
|
);
|
|
46
53
|
}
|