@configuratorware/configurator-frontendgui 1.50.4 → 1.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/App/Modules/Creator/Components/Option/index.js +3 -0
- package/App/Modules/Creator/Components/Optiondetail/index.js +6 -2
- package/App/Modules/Creator/Components/ProductPart/index.js +5 -1
- package/App/Modules/Designer/Components/ImageEditDialog/index.js +1 -2
- package/App/Modules/Designer/Containers/ImageEditDialog.js +10 -16
- package/App/Shared/Components/ConfigurationOverview/index.js +9 -4
- package/package.json +4 -4
- package/public/translations/de_DE.json +6 -0
- package/public/translations/en_GB.json +6 -0
- package/src/App/Modules/Creator/Components/Option/__snapshots__/index.test.js.snap +2 -0
- package/src/App/Modules/Creator/Components/Option/index.js +9 -1
- package/src/App/Modules/Creator/Components/Optiondetail/index.js +14 -2
- package/src/App/Modules/Creator/Components/ProductPart/__snapshots__/index.test.js.snap +8 -0
- package/src/App/Modules/Creator/Components/ProductPart/index.js +3 -0
- package/src/App/Modules/Designer/Components/ImageEditDialog/index.js +10 -14
- package/src/App/Modules/Designer/Containers/ImageEditDialog.js +1 -6
- package/src/App/Shared/Components/ConfigurationOverview/index.js +23 -4
|
@@ -288,6 +288,9 @@ var Option = function Option(_ref) {
|
|
|
288
288
|
var src = (0, _getImageUrl["default"])(thumbnail);
|
|
289
289
|
return src && /*#__PURE__*/_react["default"].createElement("img", {
|
|
290
290
|
src: src,
|
|
291
|
+
alt: (0, _i18n.t)('ariaLabels.optionImage', {
|
|
292
|
+
title: option.title
|
|
293
|
+
}),
|
|
291
294
|
onError: setImageAvailability
|
|
292
295
|
});
|
|
293
296
|
};
|
|
@@ -305,7 +305,8 @@ var Optiondetail = /*#__PURE__*/function (_React$Component) {
|
|
|
305
305
|
onClose = _this$props5.onClose,
|
|
306
306
|
details = _this$props5.details,
|
|
307
307
|
classes = _this$props5.classes,
|
|
308
|
-
width = _this$props5.width
|
|
308
|
+
width = _this$props5.width,
|
|
309
|
+
optionclassification = _this$props5.optionclassification;
|
|
309
310
|
var _this$state = this.state,
|
|
310
311
|
loading = _this$state.loading,
|
|
311
312
|
loadingContainerHeight = _this$state.loadingContainerHeight;
|
|
@@ -386,7 +387,10 @@ var Optiondetail = /*#__PURE__*/function (_React$Component) {
|
|
|
386
387
|
onLoad: this.handleImageLoaded,
|
|
387
388
|
className: this.state.zoomImage && ['xs', 'sm'].includes(width) ? classes.imageHidden : classes.image,
|
|
388
389
|
src: (0, _getImageUrl["default"])(detailImage),
|
|
389
|
-
alt:
|
|
390
|
+
alt: (0, _i18n.T)('ariaLabels.optionDetailsImage', {
|
|
391
|
+
componentTitle: optionclassification.title,
|
|
392
|
+
optionTitle: details.title
|
|
393
|
+
})
|
|
390
394
|
})), detailsContent) : detailsContent, showNav && /*#__PURE__*/_react["default"].createElement("div", {
|
|
391
395
|
className: (0, _clsx2["default"])(classes.detailNav, 'next'),
|
|
392
396
|
onClick: this.next
|
|
@@ -45,7 +45,11 @@ var ProductPart = function ProductPart(_ref) {
|
|
|
45
45
|
className: "".concat(classes.icon, " ").concat(direction),
|
|
46
46
|
style: imageUrl ? {
|
|
47
47
|
backgroundImage: 'url(' + imageUrl + ')'
|
|
48
|
-
} : {}
|
|
48
|
+
} : {},
|
|
49
|
+
"aria-label": (0, _i18n.t)('ariaLabels.component', {
|
|
50
|
+
title: optionclassification.title
|
|
51
|
+
}),
|
|
52
|
+
role: "img"
|
|
49
53
|
});
|
|
50
54
|
};
|
|
51
55
|
var displayText = function displayText() {
|
|
@@ -400,7 +400,6 @@ var ImageEditDialog = /*#__PURE__*/function (_React$Component) {
|
|
|
400
400
|
closePreviewDialog = _this$props2.closePreviewDialog,
|
|
401
401
|
continueClick = _this$props2.continueClick,
|
|
402
402
|
loaderComponent = _this$props2.loaderComponent,
|
|
403
|
-
colorPickerEnabled = _this$props2.colorPickerEnabled,
|
|
404
403
|
imageColorizeElement = _this$props2.imageColorizeElement,
|
|
405
404
|
activeTabIndex = _this$props2.activeTabIndex,
|
|
406
405
|
width = _this$props2.width,
|
|
@@ -611,7 +610,7 @@ var ImageEditDialog = /*#__PURE__*/function (_React$Component) {
|
|
|
611
610
|
}),
|
|
612
611
|
label: (0, _i18n.t)('fileUpload.removeBackgroundEverywhere'),
|
|
613
612
|
disabled: backgroundSelected === null
|
|
614
|
-
})))),
|
|
613
|
+
})))), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
615
614
|
variant: "caption",
|
|
616
615
|
className: classes.colorizeCaption
|
|
617
616
|
}, 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", {
|
|
@@ -394,7 +394,6 @@ var ImageEditDialogContainer = exports.ImageEditDialogContainer = /*#__PURE__*/f
|
|
|
394
394
|
_options$forceFetch,
|
|
395
395
|
forceFetch,
|
|
396
396
|
image,
|
|
397
|
-
activeTabIndex,
|
|
398
397
|
preview,
|
|
399
398
|
originalImagePreview,
|
|
400
399
|
previewUrl,
|
|
@@ -408,36 +407,32 @@ var ImageEditDialogContainer = exports.ImageEditDialogContainer = /*#__PURE__*/f
|
|
|
408
407
|
options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
|
|
409
408
|
_options$forceFetch = options.forceFetch, forceFetch = _options$forceFetch === void 0 ? false : _options$forceFetch;
|
|
410
409
|
image = _this.props.image;
|
|
411
|
-
activeTabIndex = _this.state.activeTabIndex;
|
|
412
410
|
preview = null;
|
|
413
411
|
originalImagePreview = null;
|
|
414
412
|
previewUrl = image === null || image === void 0 || (_image$preview = image.preview) === null || _image$preview === void 0 ? void 0 : _image$preview.url;
|
|
415
|
-
if (previewUrl && activeTabIndex === 1) {
|
|
416
|
-
previewUrl = (0, _Transformers.getRasterURL)(previewUrl);
|
|
417
|
-
}
|
|
418
413
|
isSvg = previewUrl && /\.svg$/.test(previewUrl);
|
|
419
414
|
if (!image) {
|
|
420
|
-
_context6.next =
|
|
415
|
+
_context6.next = 20;
|
|
421
416
|
break;
|
|
422
417
|
}
|
|
423
418
|
updateSVG = isSvg;
|
|
424
419
|
if (!updateSVG) {
|
|
425
|
-
_context6.next =
|
|
420
|
+
_context6.next = 17;
|
|
426
421
|
break;
|
|
427
422
|
}
|
|
428
423
|
if (svgContent) {
|
|
429
|
-
_context6.next =
|
|
424
|
+
_context6.next = 14;
|
|
430
425
|
break;
|
|
431
426
|
}
|
|
432
|
-
_context6.next =
|
|
427
|
+
_context6.next = 13;
|
|
433
428
|
return (0, _DesignDataService.getSvgContent)(image.preview.url, false, forceFetch);
|
|
434
|
-
case
|
|
429
|
+
case 13:
|
|
435
430
|
svgContent = _context6.sent;
|
|
436
|
-
case
|
|
431
|
+
case 14:
|
|
437
432
|
preview = (0, _DesignDataService.applySvgContentOperations)(image.preview, image.displayColorPreview ? image.operations : null, svgContent);
|
|
438
|
-
_context6.next =
|
|
433
|
+
_context6.next = 20;
|
|
439
434
|
break;
|
|
440
|
-
case
|
|
435
|
+
case 17:
|
|
441
436
|
forceUpdate = isImageInvalidatedByChange(_this.lastImageUpdateData, image);
|
|
442
437
|
if (forceUpdate) {
|
|
443
438
|
_this.previewVersion = Math.random();
|
|
@@ -446,13 +441,13 @@ var ImageEditDialogContainer = exports.ImageEditDialogContainer = /*#__PURE__*/f
|
|
|
446
441
|
preview = (0, _Selectors3.getPreviewUrlFromImageData)(previewUrl) + (_this.previewVersion ? "?".concat(_this.previewVersion) : '');
|
|
447
442
|
originalImagePreview = preview;
|
|
448
443
|
}
|
|
449
|
-
case
|
|
444
|
+
case 20:
|
|
450
445
|
_this.lastImageUpdateData = image;
|
|
451
446
|
_this.setState({
|
|
452
447
|
preview: preview,
|
|
453
448
|
originalImagePreview: originalImagePreview
|
|
454
449
|
});
|
|
455
|
-
case
|
|
450
|
+
case 22:
|
|
456
451
|
case "end":
|
|
457
452
|
return _context6.stop();
|
|
458
453
|
}
|
|
@@ -793,7 +788,6 @@ var ImageEditDialogContainer = exports.ImageEditDialogContainer = /*#__PURE__*/f
|
|
|
793
788
|
closePreviewDialog: this.closePreviewDialog,
|
|
794
789
|
backgroundSelected: clipping,
|
|
795
790
|
preview: preview,
|
|
796
|
-
colorPickerEnabled: !!clipping,
|
|
797
791
|
uploadDelayed: uploadDelayed,
|
|
798
792
|
continueButtonDisabled: continueButtonDisabled,
|
|
799
793
|
continueClick: this.continueClick,
|
|
@@ -11,6 +11,7 @@ var _Typography = _interopRequireDefault(require("@material-ui/core/Typography")
|
|
|
11
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
12
|
var _get = _interopRequireDefault(require("lodash/get"));
|
|
13
13
|
var _getImageUrl = _interopRequireDefault(require("../../../Utils/getImageUrl"));
|
|
14
|
+
var _i18n = require("../../../../Framework/i18n");
|
|
14
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
16
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
16
17
|
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); } }
|
|
@@ -88,10 +89,14 @@ var ConfigurationOverview = /*#__PURE__*/function (_React$Component) {
|
|
|
88
89
|
var _this$props = this.props,
|
|
89
90
|
optionclassifications = _this$props.optionclassifications,
|
|
90
91
|
classes = _this$props.classes;
|
|
91
|
-
var renderImage = function renderImage(thumbnail) {
|
|
92
|
+
var renderImage = function renderImage(thumbnail, componentTitle, optionTitle) {
|
|
92
93
|
var src = (0, _getImageUrl["default"])(thumbnail);
|
|
93
94
|
return src && /*#__PURE__*/_react["default"].createElement("img", {
|
|
94
|
-
src: src
|
|
95
|
+
src: src,
|
|
96
|
+
alt: (0, _i18n.t)('ariaLabels.overViewSelectedOptionImage', {
|
|
97
|
+
componentTitle: componentTitle,
|
|
98
|
+
optionTitle: optionTitle
|
|
99
|
+
})
|
|
95
100
|
});
|
|
96
101
|
};
|
|
97
102
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -114,11 +119,11 @@ var ConfigurationOverview = /*#__PURE__*/function (_React$Component) {
|
|
|
114
119
|
className: classes.options
|
|
115
120
|
}, option.amount !== 1 ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
116
121
|
className: classes.image
|
|
117
|
-
}, renderImage((0, _get["default"])(option, 'thumbnail', '')), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
122
|
+
}, renderImage((0, _get["default"])(option, 'thumbnail', ''), optionclassification.title, option.title), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
118
123
|
className: classes.option
|
|
119
124
|
}, option.amount, " x ", option.title)) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
120
125
|
className: classes.image
|
|
121
|
-
}, renderImage((0, _get["default"])(option, 'thumbnail', '')), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
126
|
+
}, renderImage((0, _get["default"])(option, 'thumbnail', ''), optionclassification.title, option.title), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
122
127
|
className: classes.option
|
|
123
128
|
}, option.title)));
|
|
124
129
|
}))));
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configuratorware/configurator-frontendgui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.51.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.
|
|
9
|
+
"@configuratorware/scripts": "1.51.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.
|
|
40
|
-
"redhotmagma-visualization": "1.
|
|
39
|
+
"redhotmagma-graphics-editor": "1.51.0",
|
|
40
|
+
"redhotmagma-visualization": "1.51.0",
|
|
41
41
|
"redux": "^4.1.0",
|
|
42
42
|
"redux-logger": "^3.0.6",
|
|
43
43
|
"redux-persist": "^5.10.0",
|
|
@@ -474,5 +474,11 @@
|
|
|
474
474
|
"title": "Produktübersicht",
|
|
475
475
|
"customize": "Konfigurieren",
|
|
476
476
|
"noItems": "Keine verfügbaren Produkte"
|
|
477
|
+
},
|
|
478
|
+
"ariaLabels": {
|
|
479
|
+
"component": "Komponente: %{title}",
|
|
480
|
+
"optionImage": "Option: %{title}",
|
|
481
|
+
"optionDetailsImage": "Detailansicht: %{componentTitle} %{optionTitle}",
|
|
482
|
+
"overViewSelectedOptionImage": "Meine Konfiguration: %{componentTitle} %{optionTitle}"
|
|
477
483
|
}
|
|
478
484
|
}
|
|
@@ -474,5 +474,11 @@
|
|
|
474
474
|
"title": "Item Overview",
|
|
475
475
|
"customize": "Customize",
|
|
476
476
|
"noItems": "No available items"
|
|
477
|
+
},
|
|
478
|
+
"ariaLabels": {
|
|
479
|
+
"component": "Component: %{title}",
|
|
480
|
+
"optionImage": "Option: %{title}",
|
|
481
|
+
"optionDetailsImage": "Detailed view: %{componentTitle} %{optionTitle}",
|
|
482
|
+
"overViewSelectedOptionImage": "My configuration: %{componentTitle} %{optionTitle}"
|
|
477
483
|
}
|
|
478
484
|
}
|
|
@@ -323,6 +323,7 @@ exports[`Option renders with TextInput 1`] = `
|
|
|
323
323
|
class="Option-image-154"
|
|
324
324
|
>
|
|
325
325
|
<img
|
|
326
|
+
alt="ariaLabels.optionImage"
|
|
326
327
|
src="/images/options/010002011000.png"
|
|
327
328
|
/>
|
|
328
329
|
</div>
|
|
@@ -386,6 +387,7 @@ exports[`Option renders with an available image 1`] = `
|
|
|
386
387
|
class="Option-image-8"
|
|
387
388
|
>
|
|
388
389
|
<img
|
|
390
|
+
alt="ariaLabels.optionImage"
|
|
389
391
|
src="/images/options/010002011000.png"
|
|
390
392
|
/>
|
|
391
393
|
</div>
|
|
@@ -295,7 +295,15 @@ const Option = ({ children, render, ...props }) => {
|
|
|
295
295
|
|
|
296
296
|
const renderImage = () => {
|
|
297
297
|
const src = getImageUrl(thumbnail);
|
|
298
|
-
return
|
|
298
|
+
return (
|
|
299
|
+
src && (
|
|
300
|
+
<img
|
|
301
|
+
src={src}
|
|
302
|
+
alt={t('ariaLabels.optionImage', { title: option.title })}
|
|
303
|
+
onError={setImageAvailability}
|
|
304
|
+
/>
|
|
305
|
+
)
|
|
306
|
+
);
|
|
299
307
|
};
|
|
300
308
|
|
|
301
309
|
const renderNotAvailableImage = () => {
|
|
@@ -265,7 +265,16 @@ class Optiondetail extends React.Component {
|
|
|
265
265
|
};
|
|
266
266
|
|
|
267
267
|
render() {
|
|
268
|
-
const {
|
|
268
|
+
const {
|
|
269
|
+
LoadingComponent,
|
|
270
|
+
options,
|
|
271
|
+
show,
|
|
272
|
+
onClose,
|
|
273
|
+
details,
|
|
274
|
+
classes,
|
|
275
|
+
width,
|
|
276
|
+
optionclassification,
|
|
277
|
+
} = this.props;
|
|
269
278
|
const { loading, loadingContainerHeight } = this.state;
|
|
270
279
|
const showNav = isArray(options) && options.length > 1;
|
|
271
280
|
const detailImage = details.detailImage;
|
|
@@ -389,7 +398,10 @@ class Optiondetail extends React.Component {
|
|
|
389
398
|
: classes.image
|
|
390
399
|
}
|
|
391
400
|
src={getImageUrl(detailImage)}
|
|
392
|
-
alt={
|
|
401
|
+
alt={T('ariaLabels.optionDetailsImage', {
|
|
402
|
+
componentTitle: optionclassification.title,
|
|
403
|
+
optionTitle: details.title,
|
|
404
|
+
})}
|
|
393
405
|
/>
|
|
394
406
|
</div>
|
|
395
407
|
{detailsContent}
|
|
@@ -13,7 +13,9 @@ exports[`ProductPart renders with horizontal marker 1`] = `
|
|
|
13
13
|
type="button"
|
|
14
14
|
>
|
|
15
15
|
<i
|
|
16
|
+
aria-label="ariaLabels.component"
|
|
16
17
|
class="ProductPart-icon-21 horizontal"
|
|
18
|
+
role="img"
|
|
17
19
|
style="background-image:url(/images/components/seat.png)"
|
|
18
20
|
/>
|
|
19
21
|
<span
|
|
@@ -38,7 +40,9 @@ exports[`ProductPart renders with vertical marker 1`] = `
|
|
|
38
40
|
type="button"
|
|
39
41
|
>
|
|
40
42
|
<i
|
|
43
|
+
aria-label="ariaLabels.component"
|
|
41
44
|
class="ProductPart-icon-15 vertical"
|
|
45
|
+
role="img"
|
|
42
46
|
style="background-image:url(/images/components/seat.png)"
|
|
43
47
|
/>
|
|
44
48
|
<span
|
|
@@ -63,7 +67,9 @@ exports[`ProductPart renders without marker 1`] = `
|
|
|
63
67
|
type="button"
|
|
64
68
|
>
|
|
65
69
|
<i
|
|
70
|
+
aria-label="ariaLabels.component"
|
|
66
71
|
class="ProductPart-icon-3 vertical"
|
|
72
|
+
role="img"
|
|
67
73
|
style="background-image:url(/images/components/seat.png)"
|
|
68
74
|
/>
|
|
69
75
|
<span
|
|
@@ -88,7 +94,9 @@ exports[`ProductPart renders without marker when menu is closed 1`] = `
|
|
|
88
94
|
type="button"
|
|
89
95
|
>
|
|
90
96
|
<i
|
|
97
|
+
aria-label="ariaLabels.component"
|
|
91
98
|
class="ProductPart-icon-9 vertical"
|
|
99
|
+
role="img"
|
|
92
100
|
style="background-image:url(/images/components/seat.png)"
|
|
93
101
|
/>
|
|
94
102
|
<span
|
|
@@ -7,6 +7,7 @@ import getImageUrl from 'App/Utils/getImageUrl';
|
|
|
7
7
|
import customClassName from 'App/Utils/customClassName';
|
|
8
8
|
import { Hyphenated } from 'Framework/i18n';
|
|
9
9
|
import { withStyles } from '@material-ui/core/styles';
|
|
10
|
+
import { t } from 'Framework/i18n';
|
|
10
11
|
import AccessibleButton from '../../../../Shared/Components/AccessibleButton/AccessibleButton';
|
|
11
12
|
|
|
12
13
|
const ProductPart = ({
|
|
@@ -41,6 +42,8 @@ const ProductPart = ({
|
|
|
41
42
|
<i
|
|
42
43
|
className={`${classes.icon} ${direction}`}
|
|
43
44
|
style={imageUrl ? { backgroundImage: 'url(' + imageUrl + ')' } : {}}
|
|
45
|
+
aria-label={t('ariaLabels.component', { title: optionclassification.title })}
|
|
46
|
+
role="img"
|
|
44
47
|
/>
|
|
45
48
|
);
|
|
46
49
|
};
|
|
@@ -352,7 +352,6 @@ class ImageEditDialog extends React.Component {
|
|
|
352
352
|
closePreviewDialog: PropTypes.func,
|
|
353
353
|
continueClick: PropTypes.func,
|
|
354
354
|
onChangeColor: PropTypes.func,
|
|
355
|
-
colorPickerEnabled: PropTypes.bool,
|
|
356
355
|
imageColorizeElement: PropTypes.element,
|
|
357
356
|
activeTabIndex: PropTypes.number,
|
|
358
357
|
onActiveTabChange: PropTypes.func,
|
|
@@ -464,7 +463,6 @@ class ImageEditDialog extends React.Component {
|
|
|
464
463
|
closePreviewDialog,
|
|
465
464
|
continueClick,
|
|
466
465
|
loaderComponent,
|
|
467
|
-
colorPickerEnabled,
|
|
468
466
|
imageColorizeElement,
|
|
469
467
|
activeTabIndex,
|
|
470
468
|
width,
|
|
@@ -785,18 +783,16 @@ class ImageEditDialog extends React.Component {
|
|
|
785
783
|
</RadioGroup>
|
|
786
784
|
</AnalyticsWrapper>
|
|
787
785
|
</FormControl>
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
</Typography>
|
|
799
|
-
)}
|
|
786
|
+
<Typography variant="caption" className={classes.colorizeCaption}>
|
|
787
|
+
{colorizeIcon ?? <Icon>colorize</Icon>}
|
|
788
|
+
<i>
|
|
789
|
+
{t(
|
|
790
|
+
isWidthDown('xs', width)
|
|
791
|
+
? 'fileUpload.tabColorForRemove'
|
|
792
|
+
: 'fileUpload.chooseColorForRemove'
|
|
793
|
+
)}
|
|
794
|
+
</i>
|
|
795
|
+
</Typography>
|
|
800
796
|
</div>
|
|
801
797
|
)}
|
|
802
798
|
{activeTabIndex === 2 && (
|
|
@@ -51,7 +51,7 @@ import createSelector from 'Utils/Function/createSelector';
|
|
|
51
51
|
import { getConf } from 'App/configuration';
|
|
52
52
|
import { EventTypes } from 'App/Constant';
|
|
53
53
|
import { expandVectorizeColorsMap, getClosestColorFromMap } from '../Utils/ImageEditUtils';
|
|
54
|
-
import {
|
|
54
|
+
import { isOriginalVector } from '../Utils/Transformers';
|
|
55
55
|
import { getClient, getConfigurator } from '../../../Reducers/Configurator/Selectors';
|
|
56
56
|
|
|
57
57
|
const getOperationsFromState = state => {
|
|
@@ -515,15 +515,11 @@ export class ImageEditDialogContainer extends React.Component {
|
|
|
515
515
|
updatePreview = async (svgContent, options = {}) => {
|
|
516
516
|
const { forceFetch = false } = options;
|
|
517
517
|
const { image } = this.props;
|
|
518
|
-
const { activeTabIndex } = this.state;
|
|
519
518
|
|
|
520
519
|
let preview = null;
|
|
521
520
|
let originalImagePreview = null;
|
|
522
521
|
|
|
523
522
|
let previewUrl = image?.preview?.url;
|
|
524
|
-
if (previewUrl && activeTabIndex === 1) {
|
|
525
|
-
previewUrl = getRasterURL(previewUrl);
|
|
526
|
-
}
|
|
527
523
|
|
|
528
524
|
const isSvg = previewUrl && /\.svg$/.test(previewUrl);
|
|
529
525
|
|
|
@@ -741,7 +737,6 @@ export class ImageEditDialogContainer extends React.Component {
|
|
|
741
737
|
closePreviewDialog={this.closePreviewDialog}
|
|
742
738
|
backgroundSelected={clipping}
|
|
743
739
|
preview={preview}
|
|
744
|
-
colorPickerEnabled={!!clipping}
|
|
745
740
|
uploadDelayed={uploadDelayed}
|
|
746
741
|
continueButtonDisabled={continueButtonDisabled}
|
|
747
742
|
continueClick={this.continueClick}
|
|
@@ -4,6 +4,7 @@ import Typography from '@material-ui/core/Typography';
|
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import get from 'lodash/get';
|
|
6
6
|
import getImageUrl from '../../../Utils/getImageUrl';
|
|
7
|
+
import { t } from 'Framework/i18n';
|
|
7
8
|
|
|
8
9
|
const styles = () => ({
|
|
9
10
|
tableWrapper: {
|
|
@@ -65,9 +66,19 @@ class ConfigurationOverview extends React.Component {
|
|
|
65
66
|
render() {
|
|
66
67
|
const { optionclassifications, classes } = this.props;
|
|
67
68
|
|
|
68
|
-
const renderImage = thumbnail => {
|
|
69
|
+
const renderImage = (thumbnail, componentTitle, optionTitle) => {
|
|
69
70
|
const src = getImageUrl(thumbnail);
|
|
70
|
-
return
|
|
71
|
+
return (
|
|
72
|
+
src && (
|
|
73
|
+
<img
|
|
74
|
+
src={src}
|
|
75
|
+
alt={t('ariaLabels.overViewSelectedOptionImage', {
|
|
76
|
+
componentTitle: componentTitle,
|
|
77
|
+
optionTitle: optionTitle,
|
|
78
|
+
})}
|
|
79
|
+
/>
|
|
80
|
+
)
|
|
81
|
+
);
|
|
71
82
|
};
|
|
72
83
|
|
|
73
84
|
return (
|
|
@@ -88,14 +99,22 @@ class ConfigurationOverview extends React.Component {
|
|
|
88
99
|
<li className={classes.options}>
|
|
89
100
|
{option.amount !== 1 ? (
|
|
90
101
|
<div className={classes.image}>
|
|
91
|
-
{renderImage(
|
|
102
|
+
{renderImage(
|
|
103
|
+
get(option, 'thumbnail', ''),
|
|
104
|
+
optionclassification.title,
|
|
105
|
+
option.title
|
|
106
|
+
)}
|
|
92
107
|
<Typography className={classes.option}>
|
|
93
108
|
{option.amount} x {option.title}
|
|
94
109
|
</Typography>
|
|
95
110
|
</div>
|
|
96
111
|
) : (
|
|
97
112
|
<div className={classes.image}>
|
|
98
|
-
{renderImage(
|
|
113
|
+
{renderImage(
|
|
114
|
+
get(option, 'thumbnail', ''),
|
|
115
|
+
optionclassification.title,
|
|
116
|
+
option.title
|
|
117
|
+
)}
|
|
99
118
|
<Typography className={classes.option}>
|
|
100
119
|
{option.title}
|
|
101
120
|
</Typography>
|