@configuratorware/configurator-frontendgui 1.47.11 → 1.48.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.
@@ -145,7 +145,17 @@ var DesignerSelectionToolbox = function DesignerSelectionToolbox(props) {
145
145
  defaultFont = props.defaultFont,
146
146
  loadFonts = props.loadFonts,
147
147
  initialColor = props.initialColor,
148
- autoFocusEditor = props.autoFocusEditor;
148
+ autoFocusEditor = props.autoFocusEditor,
149
+ alignVerticalCenterIcon = props.alignVerticalCenterIcon,
150
+ alignHorizontalCenterIcon = props.alignHorizontalCenterIcon,
151
+ moveDownIcon = props.moveDownIcon,
152
+ moveUpIcon = props.moveUpIcon,
153
+ formatAlignLeftIcon = props.formatAlignLeftIcon,
154
+ formatAlignCenterIcon = props.formatAlignCenterIcon,
155
+ formatAlignRightIcon = props.formatAlignRightIcon,
156
+ formatAlignJustifyIcon = props.formatAlignJustifyIcon,
157
+ formatBoldIcon = props.formatBoldIcon,
158
+ formatItalicIcon = props.formatItalicIcon;
149
159
  var rteRef = (0, _react.useRef)(null);
150
160
  var editorRef = (0, _react.useRef)(null);
151
161
  var _useState = (0, _react.useState)(false),
@@ -291,7 +301,17 @@ var DesignerSelectionToolbox = function DesignerSelectionToolbox(props) {
291
301
  canvas.selectedObject.content = getTextContent({
292
302
  isBulkName: isBulkName
293
303
  });
294
- }
304
+ },
305
+ alignVerticalCenterIcon: alignVerticalCenterIcon,
306
+ alignHorizontalCenterIcon: alignHorizontalCenterIcon,
307
+ moveDownIcon: moveDownIcon,
308
+ moveUpIcon: moveUpIcon,
309
+ formatAlignLeftIcon: formatAlignLeftIcon,
310
+ formatAlignCenterIcon: formatAlignCenterIcon,
311
+ formatAlignRightIcon: formatAlignRightIcon,
312
+ formatAlignJustifyIcon: formatAlignJustifyIcon,
313
+ formatBoldIcon: formatBoldIcon,
314
+ formatItalicIcon: formatItalicIcon
295
315
  }), /*#__PURE__*/_react["default"].createElement(CustomFontOverlayComponent, {
296
316
  onClose: function onClose() {
297
317
  return toggleCustomFontOverlay(false);
@@ -319,7 +339,11 @@ var DesignerSelectionToolbox = function DesignerSelectionToolbox(props) {
319
339
  _handleObjectButtonClick(evt, canvas, onMoveUpClick, onMoveDownClick);
320
340
  },
321
341
  flipToBackDisabled: selectedObject.isFirst,
322
- flipToFrontDisabled: selectedObject.isLast
342
+ flipToFrontDisabled: selectedObject.isLast,
343
+ alignVerticalCenterIcon: alignVerticalCenterIcon,
344
+ alignHorizontalCenterIcon: alignHorizontalCenterIcon,
345
+ moveDownIcon: moveDownIcon,
346
+ moveUpIcon: moveUpIcon
323
347
  });
324
348
  } else {
325
349
  // do not show control box for unknown object types
@@ -159,7 +159,11 @@ var ImageControlbox = /*#__PURE__*/function (_React$Component) {
159
159
  printQuality = _this$props2.printQuality,
160
160
  handleObjectButtonClick = _this$props2.handleObjectButtonClick,
161
161
  flipToFrontDisabled = _this$props2.flipToFrontDisabled,
162
- flipToBackDisabled = _this$props2.flipToBackDisabled;
162
+ flipToBackDisabled = _this$props2.flipToBackDisabled,
163
+ alignVerticalCenterIcon = _this$props2.alignVerticalCenterIcon,
164
+ alignHorizontalCenterIcon = _this$props2.alignHorizontalCenterIcon,
165
+ moveDownIcon = _this$props2.moveDownIcon,
166
+ moveUpIcon = _this$props2.moveUpIcon;
163
167
  var printQualityInfoDialogOpen = this.state.printQualityInfoDialogOpen;
164
168
  var printQualityInfoExists = (0, _i18n.translationExists)('imageControlbox.printQuality.' + this.props.printQuality);
165
169
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Card["default"], {
@@ -200,7 +204,11 @@ var ImageControlbox = /*#__PURE__*/function (_React$Component) {
200
204
  }, /*#__PURE__*/_react["default"].createElement(_ObjectTools["default"], {
201
205
  handleObjectButtonClick: handleObjectButtonClick,
202
206
  flipToFrontDisabled: flipToFrontDisabled,
203
- flipToBackDisabled: flipToBackDisabled
207
+ flipToBackDisabled: flipToBackDisabled,
208
+ alignVerticalCenterIcon: alignVerticalCenterIcon,
209
+ alignHorizontalCenterIcon: alignHorizontalCenterIcon,
210
+ moveDownIcon: moveDownIcon,
211
+ moveUpIcon: moveUpIcon
204
212
  })), /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
205
213
  item: true,
206
214
  xs: 2,
@@ -364,7 +364,11 @@ var ImageEditDialog = /*#__PURE__*/function (_React$Component) {
364
364
  var _this$props2 = this.props,
365
365
  classes = _this$props2.classes,
366
366
  width = _this$props2.width,
367
- checkOwnership = _this$props2.checkOwnership;
367
+ checkOwnership = _this$props2.checkOwnership,
368
+ imageIcon = _this$props2.imageIcon,
369
+ checkIcon = _this$props2.checkIcon,
370
+ errorIcon = _this$props2.errorIcon,
371
+ loopIcon = _this$props2.loopIcon;
368
372
  var _this$state2 = this.state,
369
373
  ownershipChecked = _this$state2.ownershipChecked,
370
374
  ownershipErrorVisible = _this$state2.ownershipErrorVisible,
@@ -381,7 +385,7 @@ var ImageEditDialog = /*#__PURE__*/function (_React$Component) {
381
385
  ref: this.dropZone
382
386
  }, /*#__PURE__*/_react["default"].createElement("div", {
383
387
  className: classes.imageUploadContainer
384
- }, selectedFile === null && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Image["default"], {
388
+ }, selectedFile === null && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, imageIcon !== null && imageIcon !== void 0 ? imageIcon : /*#__PURE__*/_react["default"].createElement(_Image["default"], {
385
389
  className: classes.imageUploadIcon
386
390
  }), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
387
391
  className: classes.imageUploadText,
@@ -400,12 +404,12 @@ var ImageEditDialog = /*#__PURE__*/function (_React$Component) {
400
404
  src: imageData.src
401
405
  }), error === null ? /*#__PURE__*/_react["default"].createElement("div", {
402
406
  className: classes.uploadTextIconContainer
403
- }, /*#__PURE__*/_react["default"].createElement(_CheckCircle["default"], {
407
+ }, checkIcon !== null && checkIcon !== void 0 ? checkIcon : /*#__PURE__*/_react["default"].createElement(_CheckCircle["default"], {
404
408
  className: "\n ".concat(classes.imageUploadIcon, "\n ").concat(classes.imageUploadIconSuccess, "\n ")
405
409
  }), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
406
410
  variant: "body2",
407
411
  className: classes.imageUploadTextSuccess
408
- }, selectedFile.name)) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Error["default"], {
412
+ }, selectedFile.name)) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, errorIcon !== null && errorIcon !== void 0 ? errorIcon : /*#__PURE__*/_react["default"].createElement(_Error["default"], {
409
413
  className: classes.imageUploadIconError
410
414
  }), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
411
415
  variant: "body2",
@@ -417,7 +421,7 @@ var ImageEditDialog = /*#__PURE__*/function (_React$Component) {
417
421
  onClick: function onClick() {},
418
422
  variant: "text",
419
423
  className: "".concat(classes.imageUploadButton, " ").concat(classes.imageUploadChangeImageButton)
420
- }, /*#__PURE__*/_react["default"].createElement(_Loop["default"], null), " ", (0, _i18n.t)('fileUpload.changeImage'), /*#__PURE__*/_react["default"].createElement("input", {
424
+ }, loopIcon !== null && loopIcon !== void 0 ? loopIcon : /*#__PURE__*/_react["default"].createElement(_Loop["default"], null), " ", (0, _i18n.t)('fileUpload.changeImage'), /*#__PURE__*/_react["default"].createElement("input", {
421
425
  type: "file",
422
426
  accept: this.getAllowedImageFormats(),
423
427
  onChange: this.handleInputChange
@@ -421,7 +421,12 @@ var ImageEditDialog = /*#__PURE__*/function (_React$Component) {
421
421
  uploadImage = _this$props2.uploadImage,
422
422
  selectUserImage = _this$props2.selectUserImage,
423
423
  showUploadPanel = _this$props2.showUploadPanel,
424
- uploadDelayed = _this$props2.uploadDelayed;
424
+ uploadDelayed = _this$props2.uploadDelayed,
425
+ loopIcon = _this$props2.loopIcon,
426
+ colorizeIcon = _this$props2.colorizeIcon,
427
+ formatPaintIcon = _this$props2.formatPaintIcon,
428
+ photoLibraryIcon = _this$props2.photoLibraryIcon,
429
+ addIcon = _this$props2.addIcon;
425
430
  var userImagesIndex = this.state.userImagesIndex;
426
431
  var userImagesIndexes = [];
427
432
  for (var i = userImagesIndex; i < userImages.length && i < userImagesIndex + 3; i++) {
@@ -499,16 +504,16 @@ var ImageEditDialog = /*#__PURE__*/function (_React$Component) {
499
504
  textColor: "primary",
500
505
  variant: (0, _withWidth.isWidthDown)('xs', width) ? 'fullWidth' : 'standard'
501
506
  }, /*#__PURE__*/_react["default"].createElement(_Tab["default"], {
502
- icon: /*#__PURE__*/_react["default"].createElement(_Loop["default"], null),
507
+ icon: loopIcon !== null && loopIcon !== void 0 ? loopIcon : /*#__PURE__*/_react["default"].createElement(_Loop["default"], null),
503
508
  className: classes.imageTab,
504
509
  label: (0, _i18n.t)('imageEditDialog.changeFile')
505
510
  }), /*#__PURE__*/_react["default"].createElement(_Tab["default"], {
506
- icon: /*#__PURE__*/_react["default"].createElement(_Colorize["default"], null),
511
+ icon: colorizeIcon !== null && colorizeIcon !== void 0 ? colorizeIcon : /*#__PURE__*/_react["default"].createElement(_Colorize["default"], null),
507
512
  className: classes.imageTab,
508
513
  label: (0, _i18n.t)('imageEditDialog.background'),
509
514
  disabled: image && image.gallery
510
515
  }), /*#__PURE__*/_react["default"].createElement(_Tab["default"], {
511
- icon: /*#__PURE__*/_react["default"].createElement(_FormatPaint["default"], null),
516
+ icon: formatPaintIcon !== null && formatPaintIcon !== void 0 ? formatPaintIcon : /*#__PURE__*/_react["default"].createElement(_FormatPaint["default"], null),
512
517
  className: classes.imageTab,
513
518
  label: (0, _i18n.t)('imageEditDialog.colorize'),
514
519
  disabled: colorDisabled
@@ -556,7 +561,7 @@ var ImageEditDialog = /*#__PURE__*/function (_React$Component) {
556
561
  variant: "outlined",
557
562
  className: classes.imageSelectButton,
558
563
  fullWidth: (0, _withWidth.isWidthDown)('sm', width)
559
- }, /*#__PURE__*/_react["default"].createElement(_PhotoLibrary["default"], {
564
+ }, photoLibraryIcon !== null && photoLibraryIcon !== void 0 ? photoLibraryIcon : /*#__PURE__*/_react["default"].createElement(_PhotoLibrary["default"], {
560
565
  className: classes.iconButton
561
566
  }), /*#__PURE__*/_react["default"].createElement("span", {
562
567
  className: classes.buttonContent
@@ -569,7 +574,7 @@ var ImageEditDialog = /*#__PURE__*/function (_React$Component) {
569
574
  variant: "outlined",
570
575
  className: classes.imageSelectButton,
571
576
  fullWidth: (0, _withWidth.isWidthDown)('sm', width)
572
- }, /*#__PURE__*/_react["default"].createElement(_AddBox["default"], {
577
+ }, addIcon !== null && addIcon !== void 0 ? addIcon : /*#__PURE__*/_react["default"].createElement(_AddBox["default"], {
573
578
  className: classes.iconButton
574
579
  }), /*#__PURE__*/_react["default"].createElement("span", {
575
580
  className: classes.buttonContent
@@ -609,7 +614,7 @@ var ImageEditDialog = /*#__PURE__*/function (_React$Component) {
609
614
  })))), colorPickerEnabled && /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
610
615
  variant: "caption",
611
616
  className: classes.colorizeCaption
612
- }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], null, "colorize"), /*#__PURE__*/_react["default"].createElement("i", null, (0, _i18n.t)((0, _withWidth.isWidthDown)('xs', width) ? 'fileUpload.tabColorForRemove' : 'fileUpload.chooseColorForRemove')))), activeTabIndex === 2 && /*#__PURE__*/_react["default"].createElement("div", {
617
+ }, colorizeIcon !== null && colorizeIcon !== void 0 ? colorizeIcon : /*#__PURE__*/_react["default"].createElement(_Icon["default"], null, "colorize"), /*#__PURE__*/_react["default"].createElement("i", null, (0, _i18n.t)((0, _withWidth.isWidthDown)('xs', width) ? 'fileUpload.tabColorForRemove' : 'fileUpload.chooseColorForRemove')))), activeTabIndex === 2 && /*#__PURE__*/_react["default"].createElement("div", {
613
618
  className: classes.TabContent
614
619
  }, imageColorizeElement)))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], {
615
620
  className: classes.imageUploadSpacing
@@ -55,7 +55,11 @@ var ObjectTools = /*#__PURE__*/function (_React$Component) {
55
55
  classes = _this$props.classes,
56
56
  handleObjectButtonClick = _this$props.handleObjectButtonClick,
57
57
  flipToBackDisabled = _this$props.flipToBackDisabled,
58
- flipToFrontDisabled = _this$props.flipToFrontDisabled;
58
+ flipToFrontDisabled = _this$props.flipToFrontDisabled,
59
+ alignVerticalCenterIcon = _this$props.alignVerticalCenterIcon,
60
+ alignHorizontalCenterIcon = _this$props.alignHorizontalCenterIcon,
61
+ moveDownIcon = _this$props.moveDownIcon,
62
+ moveUpIcon = _this$props.moveUpIcon;
59
63
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_AnalyticsWrapper["default"], {
60
64
  targetId: "align_horizontal_center"
61
65
  }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
@@ -65,7 +69,7 @@ var ObjectTools = /*#__PURE__*/function (_React$Component) {
65
69
  onClick: handleObjectButtonClick
66
70
  }, /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
67
71
  title: (0, _i18n.t)('objectTools.alignHorizontalCenter')
68
- }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], null, "flip")))), /*#__PURE__*/_react["default"].createElement(_AnalyticsWrapper["default"], {
72
+ }, alignHorizontalCenterIcon !== null && alignHorizontalCenterIcon !== void 0 ? alignHorizontalCenterIcon : /*#__PURE__*/_react["default"].createElement(_Icon["default"], null, "flip")))), /*#__PURE__*/_react["default"].createElement(_AnalyticsWrapper["default"], {
69
73
  targetId: "align_vertical_center"
70
74
  }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
71
75
  className: classes.toolButtonPositioning + ' object-btn',
@@ -74,7 +78,7 @@ var ObjectTools = /*#__PURE__*/function (_React$Component) {
74
78
  onClick: handleObjectButtonClick
75
79
  }, /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
76
80
  title: (0, _i18n.t)('objectTools.alignVerticalCenter')
77
- }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
81
+ }, alignVerticalCenterIcon !== null && alignVerticalCenterIcon !== void 0 ? alignVerticalCenterIcon : /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
78
82
  style: {
79
83
  transform: 'rotate(90deg)'
80
84
  }
@@ -88,7 +92,7 @@ var ObjectTools = /*#__PURE__*/function (_React$Component) {
88
92
  disabled: flipToBackDisabled
89
93
  }, /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
90
94
  title: (0, _i18n.t)('objectTools.moveDown')
91
- }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], null, "flip_to_back")))), /*#__PURE__*/_react["default"].createElement(_AnalyticsWrapper["default"], {
95
+ }, moveDownIcon !== null && moveDownIcon !== void 0 ? moveDownIcon : /*#__PURE__*/_react["default"].createElement(_Icon["default"], null, "flip_to_back")))), /*#__PURE__*/_react["default"].createElement(_AnalyticsWrapper["default"], {
92
96
  targetId: "align_move_up"
93
97
  }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
94
98
  className: classes.toolButtonPositioning + ' object-btn',
@@ -98,7 +102,7 @@ var ObjectTools = /*#__PURE__*/function (_React$Component) {
98
102
  disabled: flipToFrontDisabled
99
103
  }, /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
100
104
  title: (0, _i18n.t)('objectTools.moveUp')
101
- }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], null, "flip_to_front")))));
105
+ }, moveUpIcon !== null && moveUpIcon !== void 0 ? moveUpIcon : /*#__PURE__*/_react["default"].createElement(_Icon["default"], null, "flip_to_front")))));
102
106
  }
103
107
  }]);
104
108
  return ObjectTools;
@@ -286,7 +286,17 @@ var TextControlbox = /*#__PURE__*/function (_React$Component2) {
286
286
  color = _this$props2.color,
287
287
  selectedObject = _this$props2.selectedObject,
288
288
  FontFamilySelect = _this$props2.components.FontFamilySelect,
289
- isPortraitMode = _this$props2.isPortraitMode;
289
+ isPortraitMode = _this$props2.isPortraitMode,
290
+ alignVerticalCenterIcon = _this$props2.alignVerticalCenterIcon,
291
+ alignHorizontalCenterIcon = _this$props2.alignHorizontalCenterIcon,
292
+ moveDownIcon = _this$props2.moveDownIcon,
293
+ moveUpIcon = _this$props2.moveUpIcon,
294
+ formatAlignLeftIcon = _this$props2.formatAlignLeftIcon,
295
+ formatAlignCenterIcon = _this$props2.formatAlignCenterIcon,
296
+ formatAlignRightIcon = _this$props2.formatAlignRightIcon,
297
+ formatAlignJustifyIcon = _this$props2.formatAlignJustifyIcon,
298
+ formatBoldIcon = _this$props2.formatBoldIcon,
299
+ formatItalicIcon = _this$props2.formatItalicIcon;
290
300
  var textAlignFullEnabled = false;
291
301
  var renderEditor = function renderEditor() {
292
302
  return renderEditorComponent ? /*#__PURE__*/_react["default"].createElement(ContainerField, {
@@ -376,7 +386,7 @@ var TextControlbox = /*#__PURE__*/function (_React$Component2) {
376
386
  disabled: boldDisabled
377
387
  }, /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
378
388
  title: (0, _i18n.t)('textControlbox.tooltips.bold')
379
- }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], null, "format_bold")))), /*#__PURE__*/_react["default"].createElement(_AnalyticsWrapper["default"], {
389
+ }, formatBoldIcon !== null && formatBoldIcon !== void 0 ? formatBoldIcon : /*#__PURE__*/_react["default"].createElement(_Icon["default"], null, "format_bold")))), /*#__PURE__*/_react["default"].createElement(_AnalyticsWrapper["default"], {
380
390
  targetId: "text_italic"
381
391
  }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
382
392
  className: classes.textToolButton + (isItalic ? ' ' + classes.textToolButtonPressed : ''),
@@ -387,7 +397,7 @@ var TextControlbox = /*#__PURE__*/function (_React$Component2) {
387
397
  disabled: italicDisabled
388
398
  }, /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
389
399
  title: (0, _i18n.t)('textControlbox.tooltips.italic')
390
- }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], null, "format_italic")))));
400
+ }, formatItalicIcon !== null && formatItalicIcon !== void 0 ? formatItalicIcon : /*#__PURE__*/_react["default"].createElement(_Icon["default"], null, "format_italic")))));
391
401
  };
392
402
  var renderTextAlignments = function renderTextAlignments() {
393
403
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_AnalyticsWrapper["default"], {
@@ -400,7 +410,7 @@ var TextControlbox = /*#__PURE__*/function (_React$Component2) {
400
410
  onClick: handleButtonClick
401
411
  }, /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
402
412
  title: (0, _i18n.t)('textControlbox.tooltips.alignLeft')
403
- }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], null, "format_align_left")))), /*#__PURE__*/_react["default"].createElement(_AnalyticsWrapper["default"], {
413
+ }, formatAlignLeftIcon !== null && formatAlignLeftIcon !== void 0 ? formatAlignLeftIcon : /*#__PURE__*/_react["default"].createElement(_Icon["default"], null, "format_align_left")))), /*#__PURE__*/_react["default"].createElement(_AnalyticsWrapper["default"], {
404
414
  targetId: "text_align_center"
405
415
  }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
406
416
  className: classes.textToolButton + ' ' + classes.textToolButtonAlignment + (textAlign === 'center' ? ' ' + classes.textToolButtonPressed : ''),
@@ -410,7 +420,7 @@ var TextControlbox = /*#__PURE__*/function (_React$Component2) {
410
420
  onClick: handleButtonClick
411
421
  }, /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
412
422
  title: (0, _i18n.t)('textControlbox.tooltips.alignCenter')
413
- }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], null, "format_align_center")))), /*#__PURE__*/_react["default"].createElement(_AnalyticsWrapper["default"], {
423
+ }, formatAlignCenterIcon !== null && formatAlignCenterIcon !== void 0 ? formatAlignCenterIcon : /*#__PURE__*/_react["default"].createElement(_Icon["default"], null, "format_align_center")))), /*#__PURE__*/_react["default"].createElement(_AnalyticsWrapper["default"], {
414
424
  targetId: "text_align_right"
415
425
  }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
416
426
  className: classes.textToolButton + ' ' + classes.textToolButtonAlignment + (textAlign === 'right' ? ' ' + classes.textToolButtonPressed : ''),
@@ -420,7 +430,7 @@ var TextControlbox = /*#__PURE__*/function (_React$Component2) {
420
430
  onClick: handleButtonClick
421
431
  }, /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
422
432
  title: (0, _i18n.t)('textControlbox.tooltips.alignRight')
423
- }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], null, "format_align_right")))), textAlignFullEnabled && /*#__PURE__*/_react["default"].createElement(_AnalyticsWrapper["default"], {
433
+ }, formatAlignRightIcon !== null && formatAlignRightIcon !== void 0 ? formatAlignRightIcon : /*#__PURE__*/_react["default"].createElement(_Icon["default"], null, "format_align_right")))), textAlignFullEnabled && /*#__PURE__*/_react["default"].createElement(_AnalyticsWrapper["default"], {
424
434
  targetId: "text_align_justify"
425
435
  }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
426
436
  className: classes.textToolButton + ' ' + classes.textToolButtonAlignment + (textAlign === 'full' ? ' ' + classes.textToolButtonPressed : ''),
@@ -428,7 +438,7 @@ var TextControlbox = /*#__PURE__*/function (_React$Component2) {
428
438
  value: "justifyFull",
429
439
  onMouseDown: handleButtonMouseDown,
430
440
  onClick: handleButtonClick
431
- }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], null, "format_align_justify"))));
441
+ }, formatAlignJustifyIcon !== null && formatAlignJustifyIcon !== void 0 ? formatAlignJustifyIcon : /*#__PURE__*/_react["default"].createElement(_Icon["default"], null, "format_align_justify"))));
432
442
  };
433
443
  var renderTextColor = function renderTextColor() {
434
444
  return /*#__PURE__*/_react["default"].createElement(_Button["default"], {
@@ -456,7 +466,11 @@ var TextControlbox = /*#__PURE__*/function (_React$Component2) {
456
466
  return /*#__PURE__*/_react["default"].createElement(_ObjectTools["default"], {
457
467
  handleObjectButtonClick: handleObjectButtonClick,
458
468
  flipToFrontDisabled: flipToFrontDisabled,
459
- flipToBackDisabled: flipToBackDisabled
469
+ flipToBackDisabled: flipToBackDisabled,
470
+ alignVerticalCenterIcon: alignVerticalCenterIcon,
471
+ alignHorizontalCenterIcon: alignHorizontalCenterIcon,
472
+ moveDownIcon: moveDownIcon,
473
+ moveUpIcon: moveUpIcon
460
474
  });
461
475
  };
462
476
  return width === 'xs' ? /*#__PURE__*/_react["default"].createElement(_Card["default"], {
@@ -754,7 +754,15 @@ var ImageEditDialogContainer = exports.ImageEditDialogContainer = /*#__PURE__*/f
754
754
  checkOwnership = _this$props6.checkOwnership,
755
755
  designProductionMethod = _this$props6.designProductionMethod,
756
756
  client = _this$props6.client,
757
- uploadDelayed = _this$props6.uploadDelayed;
757
+ uploadDelayed = _this$props6.uploadDelayed,
758
+ loopIcon = _this$props6.loopIcon,
759
+ colorizeIcon = _this$props6.colorizeIcon,
760
+ formatPaintIcon = _this$props6.formatPaintIcon,
761
+ photoLibraryIcon = _this$props6.photoLibraryIcon,
762
+ addIcon = _this$props6.addIcon,
763
+ imageIcon = _this$props6.imageIcon,
764
+ checkIcon = _this$props6.checkIcon,
765
+ errorIcon = _this$props6.errorIcon;
758
766
  var _this$state3 = this.state,
759
767
  preview = _this$state3.preview,
760
768
  clipping = _this$state3.clipping,
@@ -839,8 +847,17 @@ var ImageEditDialogContainer = exports.ImageEditDialogContainer = /*#__PURE__*/f
839
847
  _this2.setUpload(null);
840
848
  _this2.onActiveTabChange(1);
841
849
  },
842
- checkOwnership: checkOwnership
843
- })
850
+ checkOwnership: checkOwnership,
851
+ imageIcon: imageIcon,
852
+ checkIcon: checkIcon,
853
+ errorIcon: errorIcon,
854
+ loopIcon: loopIcon
855
+ }),
856
+ loopIcon: loopIcon,
857
+ colorizeIcon: colorizeIcon,
858
+ formatPaintIcon: formatPaintIcon,
859
+ photoLibraryIcon: photoLibraryIcon,
860
+ addIcon: addIcon
844
861
  })), /*#__PURE__*/_react["default"].createElement(_AddGalleryImage["default"], {
845
862
  open: this.state.showAddImagePanel,
846
863
  onClose: this.closeAddImagePanel,
@@ -861,9 +861,11 @@ var getSwitchOptionData = function getSwitchOptionData(optionsList) {
861
861
  var component = _step4.value;
862
862
  switchOptionData[component.identifier] = component.selectedoptions.map(function (_ref5) {
863
863
  var identifier = _ref5.identifier,
864
- amount = _ref5.amount;
864
+ amount = _ref5.amount,
865
+ inputText = _ref5.inputText;
865
866
  return {
866
867
  identifier: identifier,
868
+ inputText: inputText,
867
869
  amount: typeof amount === 'undefined' ? 1 : amount,
868
870
  check_results: null
869
871
  };
@@ -13,13 +13,16 @@ var _DialogActions = _interopRequireDefault(require("@material-ui/core/DialogAct
13
13
  var _Typography = _interopRequireDefault(require("@material-ui/core/Typography"));
14
14
  var _CheckCircle = _interopRequireDefault(require("@material-ui/icons/CheckCircle"));
15
15
  var _FileCopy = _interopRequireDefault(require("@material-ui/icons/FileCopy"));
16
- var _Error = _interopRequireDefault(require("@material-ui/icons/Error"));
16
+ var _Error2 = _interopRequireDefault(require("@material-ui/icons/Error"));
17
17
  var _MainButton = _interopRequireDefault(require("../../../../Shared/Components/MainButton"));
18
18
  var _CustomDialog = _interopRequireDefault(require("../../../../Shared/Components/CustomDialog"));
19
19
  var _propTypes = _interopRequireDefault(require("prop-types"));
20
20
  var _Tooltip = _interopRequireDefault(require("@material-ui/core/Tooltip"));
21
21
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
22
22
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
23
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
24
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
25
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
23
26
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
24
27
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
25
28
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
@@ -112,31 +115,52 @@ var SaveConfiguration = /*#__PURE__*/function (_React$Component) {
112
115
  args[_key] = arguments[_key];
113
116
  }
114
117
  _this = _super.call.apply(_super, [this].concat(args));
115
- _defineProperty(_assertThisInitialized(_this), "onCopyShareUrl", function (shareUrl) {
116
- try {
117
- navigator.clipboard.writeText(shareUrl);
118
- } catch (err) {
119
- // clipboard api only available in secure contexts (localhost, htttps) and modern(ish) browsers
120
- var textArea = document.createElement('textarea');
121
- textArea.textContent = shareUrl;
122
- textArea.style.position = 'fixed'; //avoid scrolling to bottom
123
- document.body.appendChild(textArea);
124
- var selection = document.getSelection();
125
- var range = document.createRange();
126
- range.selectNode(textArea);
127
- selection.removeAllRanges();
128
- selection.addRange(range);
129
- try {
130
- document.execCommand('copy');
131
- } catch (err) {
132
- // eslint-disable-next-line no-console
133
- console.log('Configuration link could not be copied: ', err);
134
- } finally {
135
- selection.removeAllRanges();
136
- document.body.removeChild(textArea);
137
- }
138
- }
139
- });
118
+ _defineProperty(_assertThisInitialized(_this), "onCopyShareUrl", /*#__PURE__*/function () {
119
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(shareUrl) {
120
+ var textArea, selection, range;
121
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
122
+ while (1) switch (_context.prev = _context.next) {
123
+ case 0:
124
+ _context.prev = 0;
125
+ _context.next = 3;
126
+ return navigator.clipboard.writeText(shareUrl);
127
+ case 3:
128
+ _context.next = 18;
129
+ break;
130
+ case 5:
131
+ _context.prev = 5;
132
+ _context.t0 = _context["catch"](0);
133
+ // eslint-disable-next-line no-console
134
+ console.error('Error while using the clipboard api:', _context.t0);
135
+ // clipboard api only available in secure contexts (localhost, htttps) and modern(ish) browsers
136
+ textArea = document.createElement('textarea');
137
+ textArea.textContent = shareUrl;
138
+ textArea.style.position = 'fixed'; //avoid scrolling to bottom
139
+ document.body.appendChild(textArea);
140
+ selection = document.getSelection();
141
+ range = document.createRange();
142
+ range.selectNode(textArea);
143
+ selection.removeAllRanges();
144
+ selection.addRange(range);
145
+ try {
146
+ document.execCommand('copy');
147
+ } catch (err) {
148
+ // eslint-disable-next-line no-console
149
+ console.log('Configuration link could not be copied: ', err);
150
+ } finally {
151
+ selection.removeAllRanges();
152
+ document.body.removeChild(textArea);
153
+ }
154
+ case 18:
155
+ case "end":
156
+ return _context.stop();
157
+ }
158
+ }, _callee, null, [[0, 5]]);
159
+ }));
160
+ return function (_x) {
161
+ return _ref.apply(this, arguments);
162
+ };
163
+ }());
140
164
  return _this;
141
165
  }
142
166
  _createClass(SaveConfiguration, [{
@@ -174,7 +198,7 @@ var SaveConfiguration = /*#__PURE__*/function (_React$Component) {
174
198
  id: "alert-dialog-description"
175
199
  }, /*#__PURE__*/_react["default"].createElement("div", {
176
200
  className: classes.errorResult
177
- }, /*#__PURE__*/_react["default"].createElement(_Error["default"], {
201
+ }, /*#__PURE__*/_react["default"].createElement(_Error2["default"], {
178
202
  className: classes.errorResultIcon
179
203
  }), (0, _i18n.t)(errorMessage))), !workInProgress && code && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
180
204
  variant: "body1",
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@configuratorware/configurator-frontendgui",
3
- "version": "1.47.11",
3
+ "version": "1.48.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.47.11",
9
+ "@configuratorware/scripts": "1.48.0",
10
10
  "@material-ui/core": "^4.12.4",
11
11
  "@material-ui/icons": "^4.11.3",
12
12
  "@material-ui/lab": "^4.0.0-alpha.61",
@@ -36,8 +36,8 @@
36
36
  "react-router-dom": "^5.3.4",
37
37
  "react-swipeable": "^5.5.1",
38
38
  "react-zoom-pan-pinch": "^2.1.3",
39
- "redhotmagma-graphics-editor": "1.47.11",
40
- "redhotmagma-visualization": "1.47.11",
39
+ "redhotmagma-graphics-editor": "1.48.0",
40
+ "redhotmagma-visualization": "1.48.0",
41
41
  "redux": "^4.1.0",
42
42
  "redux-logger": "^3.0.6",
43
43
  "redux-persist": "^5.10.0",
@@ -134,6 +134,16 @@ const DesignerSelectionToolbox = props => {
134
134
  loadFonts,
135
135
  initialColor,
136
136
  autoFocusEditor,
137
+ alignVerticalCenterIcon,
138
+ alignHorizontalCenterIcon,
139
+ moveDownIcon,
140
+ moveUpIcon,
141
+ formatAlignLeftIcon,
142
+ formatAlignCenterIcon,
143
+ formatAlignRightIcon,
144
+ formatAlignJustifyIcon,
145
+ formatBoldIcon,
146
+ formatItalicIcon,
137
147
  } = props;
138
148
 
139
149
  const rteRef = useRef(null);
@@ -335,6 +345,16 @@ const DesignerSelectionToolbox = props => {
335
345
  isBulkName,
336
346
  });
337
347
  }}
348
+ alignVerticalCenterIcon={alignVerticalCenterIcon}
349
+ alignHorizontalCenterIcon={alignHorizontalCenterIcon}
350
+ moveDownIcon={moveDownIcon}
351
+ moveUpIcon={moveUpIcon}
352
+ formatAlignLeftIcon={formatAlignLeftIcon}
353
+ formatAlignCenterIcon={formatAlignCenterIcon}
354
+ formatAlignRightIcon={formatAlignRightIcon}
355
+ formatAlignJustifyIcon={formatAlignJustifyIcon}
356
+ formatBoldIcon={formatBoldIcon}
357
+ formatItalicIcon={formatItalicIcon}
338
358
  />
339
359
  <CustomFontOverlayComponent
340
360
  onClose={() => toggleCustomFontOverlay(false)}
@@ -370,6 +390,10 @@ const DesignerSelectionToolbox = props => {
370
390
  }}
371
391
  flipToBackDisabled={selectedObject.isFirst}
372
392
  flipToFrontDisabled={selectedObject.isLast}
393
+ alignVerticalCenterIcon={alignVerticalCenterIcon}
394
+ alignHorizontalCenterIcon={alignHorizontalCenterIcon}
395
+ moveDownIcon={moveDownIcon}
396
+ moveUpIcon={moveUpIcon}
373
397
  />
374
398
  );
375
399
  } else {
@@ -404,6 +428,16 @@ DesignerSelectionToolbox.propTypes = {
404
428
  defaultFont: PropTypes.object,
405
429
  initialColor: PropTypes.object,
406
430
  autoFocusEditor: PropTypes.bool,
431
+ alignVerticalCenterIcon: PropTypes.element,
432
+ alignHorizontalCenterIcon: PropTypes.element,
433
+ moveDownIcon: PropTypes.element,
434
+ moveUpIcon: PropTypes.element,
435
+ formatAlignLeftIcon: PropTypes.element,
436
+ formatAlignCenterIcon: PropTypes.element,
437
+ formatAlignRightIcon: PropTypes.element,
438
+ formatAlignJustifyIcon: PropTypes.element,
439
+ formatBoldIcon: PropTypes.element,
440
+ formatItalicIcon: PropTypes.element,
407
441
  };
408
442
 
409
443
  DesignerSelectionToolbox.defaultProps = {
@@ -113,6 +113,10 @@ class ImageControlbox extends React.Component {
113
113
  flipToFrontDisabled: PropTypes.bool,
114
114
  flipToBackDisabled: PropTypes.bool,
115
115
  canvas: PropTypes.object,
116
+ alignVerticalCenterIcon: PropTypes.element,
117
+ alignHorizontalCenterIcon: PropTypes.element,
118
+ moveDownIcon: PropTypes.element,
119
+ moveUpIcon: PropTypes.element,
116
120
  };
117
121
 
118
122
  constructor(props) {
@@ -148,6 +152,10 @@ class ImageControlbox extends React.Component {
148
152
  handleObjectButtonClick,
149
153
  flipToFrontDisabled,
150
154
  flipToBackDisabled,
155
+ alignVerticalCenterIcon,
156
+ alignHorizontalCenterIcon,
157
+ moveDownIcon,
158
+ moveUpIcon,
151
159
  } = this.props;
152
160
 
153
161
  const { printQualityInfoDialogOpen } = this.state;
@@ -203,6 +211,10 @@ class ImageControlbox extends React.Component {
203
211
  handleObjectButtonClick={handleObjectButtonClick}
204
212
  flipToFrontDisabled={flipToFrontDisabled}
205
213
  flipToBackDisabled={flipToBackDisabled}
214
+ alignVerticalCenterIcon={alignVerticalCenterIcon}
215
+ alignHorizontalCenterIcon={alignHorizontalCenterIcon}
216
+ moveDownIcon={moveDownIcon}
217
+ moveUpIcon={moveUpIcon}
206
218
  />
207
219
  </Grid>
208
220
  <Grid item xs={2} md={4} lg={4}>
@@ -177,6 +177,10 @@ class ImageEditDialog extends React.Component {
177
177
  onUploadFinished: PropTypes.func,
178
178
  width: PropTypes.string,
179
179
  checkOwnership: PropTypes.bool,
180
+ imageIcon: PropTypes.element,
181
+ checkIcon: PropTypes.element,
182
+ errorIcon: PropTypes.element,
183
+ loopIcon: PropTypes.element,
180
184
  };
181
185
 
182
186
  static defaultProps = {
@@ -313,7 +317,7 @@ class ImageEditDialog extends React.Component {
313
317
  };
314
318
 
315
319
  render() {
316
- const { classes, width, checkOwnership } = this.props;
320
+ const { classes, width, checkOwnership, imageIcon, checkIcon, errorIcon, loopIcon } = this.props;
317
321
  const { ownershipChecked, ownershipErrorVisible, selectedFile, error, imageData } = this.state;
318
322
 
319
323
  return (
@@ -327,7 +331,7 @@ class ImageEditDialog extends React.Component {
327
331
  <div className={classes.imageUploadContainer}>
328
332
  {selectedFile === null && (
329
333
  <React.Fragment>
330
- <ImageIcon className={classes.imageUploadIcon} />
334
+ {imageIcon ?? <ImageIcon className={classes.imageUploadIcon} />}
331
335
  <Typography className={classes.imageUploadText} variant="body2">
332
336
  {t(
333
337
  isWidthDown('sm', width)
@@ -362,12 +366,14 @@ class ImageEditDialog extends React.Component {
362
366
  )}
363
367
  {error === null ? (
364
368
  <div className={classes.uploadTextIconContainer}>
365
- <CheckCircleIcon
366
- className={`
369
+ {checkIcon ?? (
370
+ <CheckCircleIcon
371
+ className={`
367
372
  ${classes.imageUploadIcon}
368
373
  ${classes.imageUploadIconSuccess}
369
374
  `}
370
- />
375
+ />
376
+ )}
371
377
  <Typography
372
378
  variant="body2"
373
379
  className={classes.imageUploadTextSuccess}
@@ -377,7 +383,7 @@ class ImageEditDialog extends React.Component {
377
383
  </div>
378
384
  ) : (
379
385
  <React.Fragment>
380
- <ErrorIcon className={classes.imageUploadIconError} />
386
+ {errorIcon ?? <ErrorIcon className={classes.imageUploadIconError} />}
381
387
  <Typography
382
388
  variant="body2"
383
389
  className={`
@@ -401,7 +407,7 @@ class ImageEditDialog extends React.Component {
401
407
  variant="text"
402
408
  className={`${classes.imageUploadButton} ${classes.imageUploadChangeImageButton}`}
403
409
  >
404
- <LoopIcon /> {t('fileUpload.changeImage')}
410
+ {loopIcon ?? <LoopIcon />} {t('fileUpload.changeImage')}
405
411
  <input
406
412
  type="file"
407
413
  accept={this.getAllowedImageFormats()}
@@ -380,6 +380,11 @@ class ImageEditDialog extends React.Component {
380
380
  onNewUploadClick: PropTypes.func.isRequired,
381
381
  uploadImage: PropTypes.func.isRequired,
382
382
  selectUserImage: PropTypes.func.isRequired,
383
+ loopIcon: PropTypes.element,
384
+ colorizeIcon: PropTypes.element,
385
+ formatPaintIcon: PropTypes.element,
386
+ photoLibraryIcon: PropTypes.element,
387
+ addIcon: PropTypes.element,
383
388
  };
384
389
 
385
390
  constructor(props) {
@@ -481,6 +486,11 @@ class ImageEditDialog extends React.Component {
481
486
  selectUserImage,
482
487
  showUploadPanel,
483
488
  uploadDelayed,
489
+ loopIcon,
490
+ colorizeIcon,
491
+ formatPaintIcon,
492
+ photoLibraryIcon,
493
+ addIcon,
484
494
  } = this.props;
485
495
 
486
496
  const { userImagesIndex } = this.state;
@@ -629,18 +639,18 @@ class ImageEditDialog extends React.Component {
629
639
  variant={isWidthDown('xs', width) ? 'fullWidth' : 'standard'}
630
640
  >
631
641
  <Tab
632
- icon={<LoopIcon />}
642
+ icon={loopIcon ?? <LoopIcon />}
633
643
  className={classes.imageTab}
634
644
  label={t('imageEditDialog.changeFile')}
635
645
  />
636
646
  <Tab
637
- icon={<ColorizeIcon />}
647
+ icon={colorizeIcon ?? <ColorizeIcon />}
638
648
  className={classes.imageTab}
639
649
  label={t('imageEditDialog.background')}
640
650
  disabled={image && image.gallery}
641
651
  />
642
652
  <Tab
643
- icon={<FormatPaintIcon />}
653
+ icon={formatPaintIcon ?? <FormatPaintIcon />}
644
654
  className={classes.imageTab}
645
655
  label={t('imageEditDialog.colorize')}
646
656
  disabled={colorDisabled}
@@ -710,7 +720,9 @@ class ImageEditDialog extends React.Component {
710
720
  className={classes.imageSelectButton}
711
721
  fullWidth={isWidthDown('sm', width)}
712
722
  >
713
- <PhotoLibrary className={classes.iconButton} />
723
+ {photoLibraryIcon ?? (
724
+ <PhotoLibrary className={classes.iconButton} />
725
+ )}
714
726
  <span className={classes.buttonContent}>
715
727
  {t('imageEditDialog.selectFromGallery')}
716
728
  </span>
@@ -725,7 +737,7 @@ class ImageEditDialog extends React.Component {
725
737
  className={classes.imageSelectButton}
726
738
  fullWidth={isWidthDown('sm', width)}
727
739
  >
728
- <AddBox className={classes.iconButton} />
740
+ {addIcon ?? <AddBox className={classes.iconButton} />}
729
741
  <span className={classes.buttonContent}>
730
742
  {t('imageEditDialog.uploadNewImage')}
731
743
  </span>
@@ -775,7 +787,7 @@ class ImageEditDialog extends React.Component {
775
787
  </FormControl>
776
788
  {colorPickerEnabled && (
777
789
  <Typography variant="caption" className={classes.colorizeCaption}>
778
- <Icon>colorize</Icon>
790
+ {colorizeIcon ?? <Icon>colorize</Icon>}
779
791
  <i>
780
792
  {t(
781
793
  isWidthDown('xs', width)
@@ -28,10 +28,23 @@ class ObjectTools extends React.Component {
28
28
  handleObjectButtonClick: PropTypes.func,
29
29
  flipToBackDisabled: PropTypes.bool,
30
30
  flipToFrontDisabled: PropTypes.bool,
31
+ alignVerticalCenterIcon: PropTypes.element,
32
+ alignHorizontalCenterIcon: PropTypes.element,
33
+ moveDownIcon: PropTypes.element,
34
+ moveUpIcon: PropTypes.element,
31
35
  };
32
36
 
33
37
  render() {
34
- const { classes, handleObjectButtonClick, flipToBackDisabled, flipToFrontDisabled } = this.props;
38
+ const {
39
+ classes,
40
+ handleObjectButtonClick,
41
+ flipToBackDisabled,
42
+ flipToFrontDisabled,
43
+ alignVerticalCenterIcon,
44
+ alignHorizontalCenterIcon,
45
+ moveDownIcon,
46
+ moveUpIcon,
47
+ } = this.props;
35
48
 
36
49
  return (
37
50
  <React.Fragment>
@@ -43,7 +56,7 @@ class ObjectTools extends React.Component {
43
56
  onClick={handleObjectButtonClick}
44
57
  >
45
58
  <Tooltip title={t('objectTools.alignHorizontalCenter')}>
46
- <Icon>flip</Icon>
59
+ {alignHorizontalCenterIcon ?? <Icon>flip</Icon>}
47
60
  </Tooltip>
48
61
  </Button>
49
62
  </AnalyticsWrapper>
@@ -55,7 +68,9 @@ class ObjectTools extends React.Component {
55
68
  onClick={handleObjectButtonClick}
56
69
  >
57
70
  <Tooltip title={t('objectTools.alignVerticalCenter')}>
58
- <Icon style={{ transform: 'rotate(90deg)' }}>flip</Icon>
71
+ {alignVerticalCenterIcon ?? (
72
+ <Icon style={{ transform: 'rotate(90deg)' }}>flip</Icon>
73
+ )}
59
74
  </Tooltip>
60
75
  </Button>
61
76
  </AnalyticsWrapper>
@@ -68,7 +83,7 @@ class ObjectTools extends React.Component {
68
83
  disabled={flipToBackDisabled}
69
84
  >
70
85
  <Tooltip title={t('objectTools.moveDown')}>
71
- <Icon>flip_to_back</Icon>
86
+ {moveDownIcon ?? <Icon>flip_to_back</Icon>}
72
87
  </Tooltip>
73
88
  </Button>
74
89
  </AnalyticsWrapper>
@@ -81,7 +96,7 @@ class ObjectTools extends React.Component {
81
96
  disabled={flipToFrontDisabled}
82
97
  >
83
98
  <Tooltip title={t('objectTools.moveUp')}>
84
- <Icon>flip_to_front</Icon>
99
+ {moveUpIcon ?? <Icon>flip_to_front</Icon>}
85
100
  </Tooltip>
86
101
  </Button>
87
102
  </AnalyticsWrapper>
@@ -250,6 +250,16 @@ class TextControlbox extends React.Component {
250
250
  components: PropTypes.shape({
251
251
  FontFamilySelect: PropTypes.elementType.isRequired,
252
252
  }).isRequired,
253
+ alignVerticalCenterIcon: PropTypes.element,
254
+ alignHorizontalCenterIcon: PropTypes.element,
255
+ moveDownIcon: PropTypes.element,
256
+ moveUpIcon: PropTypes.element,
257
+ formatAlignLeftIcon: PropTypes.element,
258
+ formatAlignCenterIcon: PropTypes.element,
259
+ formatAlignRightIcon: PropTypes.element,
260
+ formatAlignJustifyIcon: PropTypes.element,
261
+ formatBoldIcon: PropTypes.element,
262
+ formatItalicIcon: PropTypes.element,
253
263
  };
254
264
 
255
265
  static defaultProps = {
@@ -297,6 +307,16 @@ class TextControlbox extends React.Component {
297
307
  selectedObject,
298
308
  components: { FontFamilySelect },
299
309
  isPortraitMode,
310
+ alignVerticalCenterIcon,
311
+ alignHorizontalCenterIcon,
312
+ moveDownIcon,
313
+ moveUpIcon,
314
+ formatAlignLeftIcon,
315
+ formatAlignCenterIcon,
316
+ formatAlignRightIcon,
317
+ formatAlignJustifyIcon,
318
+ formatBoldIcon,
319
+ formatItalicIcon,
300
320
  } = this.props;
301
321
  const textAlignFullEnabled = false;
302
322
 
@@ -408,7 +428,7 @@ class TextControlbox extends React.Component {
408
428
  disabled={boldDisabled}
409
429
  >
410
430
  <Tooltip title={t('textControlbox.tooltips.bold')}>
411
- <Icon>format_bold</Icon>
431
+ {formatBoldIcon ?? <Icon>format_bold</Icon>}
412
432
  </Tooltip>
413
433
  </Button>
414
434
  </AnalyticsWrapper>
@@ -424,7 +444,7 @@ class TextControlbox extends React.Component {
424
444
  disabled={italicDisabled}
425
445
  >
426
446
  <Tooltip title={t('textControlbox.tooltips.italic')}>
427
- <Icon>format_italic</Icon>
447
+ {formatItalicIcon ?? <Icon>format_italic</Icon>}
428
448
  </Tooltip>
429
449
  </Button>
430
450
  </AnalyticsWrapper>
@@ -450,7 +470,7 @@ class TextControlbox extends React.Component {
450
470
  onClick={handleButtonClick}
451
471
  >
452
472
  <Tooltip title={t('textControlbox.tooltips.alignLeft')}>
453
- <Icon>format_align_left</Icon>
473
+ {formatAlignLeftIcon ?? <Icon>format_align_left</Icon>}
454
474
  </Tooltip>
455
475
  </Button>
456
476
  </AnalyticsWrapper>
@@ -468,7 +488,7 @@ class TextControlbox extends React.Component {
468
488
  onClick={handleButtonClick}
469
489
  >
470
490
  <Tooltip title={t('textControlbox.tooltips.alignCenter')}>
471
- <Icon>format_align_center</Icon>
491
+ {formatAlignCenterIcon ?? <Icon>format_align_center</Icon>}
472
492
  </Tooltip>
473
493
  </Button>
474
494
  </AnalyticsWrapper>
@@ -486,7 +506,7 @@ class TextControlbox extends React.Component {
486
506
  onClick={handleButtonClick}
487
507
  >
488
508
  <Tooltip title={t('textControlbox.tooltips.alignRight')}>
489
- <Icon>format_align_right</Icon>
509
+ {formatAlignRightIcon ?? <Icon>format_align_right</Icon>}
490
510
  </Tooltip>
491
511
  </Button>
492
512
  </AnalyticsWrapper>
@@ -504,7 +524,7 @@ class TextControlbox extends React.Component {
504
524
  onMouseDown={handleButtonMouseDown}
505
525
  onClick={handleButtonClick}
506
526
  >
507
- <Icon>format_align_justify</Icon>
527
+ {formatAlignJustifyIcon ?? <Icon>format_align_justify</Icon>}
508
528
  </Button>
509
529
  </AnalyticsWrapper>
510
530
  )}
@@ -544,6 +564,10 @@ class TextControlbox extends React.Component {
544
564
  handleObjectButtonClick={handleObjectButtonClick}
545
565
  flipToFrontDisabled={flipToFrontDisabled}
546
566
  flipToBackDisabled={flipToBackDisabled}
567
+ alignVerticalCenterIcon={alignVerticalCenterIcon}
568
+ alignHorizontalCenterIcon={alignHorizontalCenterIcon}
569
+ moveDownIcon={moveDownIcon}
570
+ moveUpIcon={moveUpIcon}
547
571
  />
548
572
  );
549
573
  };
@@ -129,6 +129,14 @@ export class ImageEditDialogContainer extends React.Component {
129
129
  client: PropTypes.object,
130
130
  designProductionMethod: PropTypes.object,
131
131
  uploadDelayed: PropTypes.bool,
132
+ loopIcon: PropTypes.element,
133
+ colorizeIcon: PropTypes.element,
134
+ formatPaintIcon: PropTypes.element,
135
+ photoLibraryIcon: PropTypes.element,
136
+ addIcon: PropTypes.element,
137
+ imageIcon: PropTypes.element,
138
+ checkIcon: PropTypes.element,
139
+ errorIcon: PropTypes.element,
132
140
  };
133
141
 
134
142
  static defaultProps = {
@@ -682,6 +690,14 @@ export class ImageEditDialogContainer extends React.Component {
682
690
  designProductionMethod,
683
691
  client,
684
692
  uploadDelayed,
693
+ loopIcon,
694
+ colorizeIcon,
695
+ formatPaintIcon,
696
+ photoLibraryIcon,
697
+ addIcon,
698
+ imageIcon,
699
+ checkIcon,
700
+ errorIcon,
685
701
  } = this.props;
686
702
  const {
687
703
  preview,
@@ -778,8 +794,17 @@ export class ImageEditDialogContainer extends React.Component {
778
794
  this.onActiveTabChange(1);
779
795
  }}
780
796
  checkOwnership={checkOwnership}
797
+ imageIcon={imageIcon}
798
+ checkIcon={checkIcon}
799
+ errorIcon={errorIcon}
800
+ loopIcon={loopIcon}
781
801
  />
782
802
  }
803
+ loopIcon={loopIcon}
804
+ colorizeIcon={colorizeIcon}
805
+ formatPaintIcon={formatPaintIcon}
806
+ photoLibraryIcon={photoLibraryIcon}
807
+ addIcon={addIcon}
783
808
  />
784
809
  <AddGalleryImage
785
810
  open={this.state.showAddImagePanel}
@@ -793,11 +793,14 @@ export const selectMultipleOptions = optionsList => (dispatch, getState) => {
793
793
  const getSwitchOptionData = optionsList => {
794
794
  const switchOptionData = {};
795
795
  for (const component of optionsList) {
796
- switchOptionData[component.identifier] = component.selectedoptions.map(({ identifier, amount }) => ({
797
- identifier,
798
- amount: typeof amount === 'undefined' ? 1 : amount,
799
- check_results: null,
800
- }));
796
+ switchOptionData[component.identifier] = component.selectedoptions.map(
797
+ ({ identifier, amount, inputText }) => ({
798
+ identifier,
799
+ inputText,
800
+ amount: typeof amount === 'undefined' ? 1 : amount,
801
+ check_results: null,
802
+ })
803
+ );
801
804
  }
802
805
 
803
806
  return switchOptionData;
@@ -99,10 +99,12 @@ class SaveConfiguration extends React.Component {
99
99
  static defaultProps = {
100
100
  IconCopyShareUrl: FileCopy,
101
101
  };
102
- onCopyShareUrl = shareUrl => {
102
+ onCopyShareUrl = async shareUrl => {
103
103
  try {
104
- navigator.clipboard.writeText(shareUrl);
104
+ await navigator.clipboard.writeText(shareUrl);
105
105
  } catch (err) {
106
+ // eslint-disable-next-line no-console
107
+ console.error('Error while using the clipboard api:', err);
106
108
  // clipboard api only available in secure contexts (localhost, htttps) and modern(ish) browsers
107
109
  const textArea = document.createElement('textarea');
108
110
  textArea.textContent = shareUrl;