@configuratorware/configurator-frontendgui 1.49.9 → 1.50.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/Error/ProductionErrorPage/index.js +5 -1
- package/App/Modules/Creator/Components/Incompatibility/OptionExclusionRule/index.js +2 -1
- package/App/Modules/Creator/Components/Incompatibility/OptionRule/index.js +2 -1
- package/App/Modules/Creator/Components/Incompatibility/index.js +1 -2
- package/App/Modules/Creator/Components/InvalidConfigurationNotice/index.js +8 -31
- package/App/Modules/Creator/Components/Option/index.js +18 -14
- package/App/Modules/Creator/Components/OptionAmount/index.js +11 -7
- package/App/Modules/Creator/Components/ProductPart/index.js +20 -25
- package/App/Modules/Creator/Components/ProductPartsList/index.js +0 -2
- package/App/Modules/Creator/Layouts/DefaultLayout.js +8 -9
- package/App/Modules/Designer/Components/AddGalleryImage/index.js +5 -2
- package/App/Modules/Designer/Components/DesignerSelectionToolbox/CustomFontOverlay.js +0 -2
- package/App/Modules/Designer/Components/Dialog/index.js +1 -3
- package/App/Modules/Designer/Components/ImageControlbox/index.js +1 -3
- package/App/Reducers/Reducer.js +8 -2
- package/App/Screens/Configurator/Components/Confirm/index.js +1 -5
- package/App/Screens/Configurator/Components/Error/index.js +0 -3
- package/App/Screens/Configurator/Components/FullScreenView/index.js +2 -5
- package/App/Screens/Configurator/Components/FullScreenView/index.test.js +1 -1
- package/App/Screens/Configurator/Components/PreviewPortal/index.js +23 -28
- package/App/Screens/Configurator/Components/Thumbnail/index.js +9 -6
- package/App/Screens/Configurator/ThemeProvider.js +7 -4
- package/App/Shared/Components/AccessibleButton/AccessibleButton.js +40 -0
- package/App/Shared/Components/AlertDialog/index.js +0 -3
- package/App/Shared/Components/AmountPrice/index.js +29 -20
- package/App/Shared/Components/Analytics/AnalyticsWrapper.js +7 -1
- package/App/Shared/Components/AutoFocusDialogContentContainer/AutoFocusDialogContentContainer.js +71 -0
- package/App/Shared/Components/BulkNames/index.js +9 -6
- package/App/Shared/Components/LoadConfiguration/index.js +0 -2
- package/App/Shared/Components/PdfDownload/index.js +0 -2
- package/App/Shared/Components/SaveConfiguration/index.js +3 -4
- package/App/Shared/Components/SendEmail/index.js +0 -2
- package/App/Shared/Components/ToolbarList/index.js +18 -16
- package/App/Shared/Hooks/useDialogId.js +19 -0
- package/Shared/Components/CustomDialog.js +77 -56
- package/package.json +4 -4
- package/public/invoke.js +1 -1
- package/public/translations/de_DE.json +2 -1
- package/public/translations/en_GB.json +2 -1
- package/scripts/utils/fileSystem.js +6 -1
- package/src/App/Error/ProductionErrorPage/index.js +27 -24
- package/src/App/Modules/Creator/Components/Incompatibility/OptionExclusionRule/index.js +1 -1
- package/src/App/Modules/Creator/Components/Incompatibility/OptionRule/index.js +1 -1
- package/src/App/Modules/Creator/Components/Incompatibility/index.js +1 -2
- package/src/App/Modules/Creator/Components/InvalidConfigurationNotice/index.js +10 -27
- package/src/App/Modules/Creator/Components/Option/__snapshots__/index.test.js.snap +142 -90
- package/src/App/Modules/Creator/Components/Option/index.js +30 -14
- package/src/App/Modules/Creator/Components/OptionAmount/__snapshots__/index.test.js.snap +31 -18
- package/src/App/Modules/Creator/Components/OptionAmount/index.js +7 -2
- package/src/App/Modules/Creator/Components/ProductPart/__snapshots__/index.test.js.snap +32 -24
- package/src/App/Modules/Creator/Components/ProductPart/index.js +20 -27
- package/src/App/Modules/Creator/Components/ProductPartsList/index.js +0 -2
- package/src/App/Modules/Creator/Layouts/DefaultLayout.js +12 -13
- package/src/App/Modules/Designer/Components/AddGalleryImage/__snapshots__/index.test.jsx.snap +1 -0
- package/src/App/Modules/Designer/Components/AddGalleryImage/index.js +4 -1
- package/src/App/Modules/Designer/Components/DesignerSelectionToolbox/CustomFontOverlay.js +0 -2
- package/src/App/Modules/Designer/Components/Dialog/index.js +1 -1
- package/src/App/Modules/Designer/Components/ImageControlbox/index.js +0 -2
- package/src/App/Reducers/Reducer.js +7 -0
- package/src/App/Screens/Configurator/Components/Confirm/index.js +1 -3
- package/src/App/Screens/Configurator/Components/Error/index.js +2 -11
- package/src/App/Screens/Configurator/Components/FullScreenView/__snapshots__/index.test.jsx.snap +3 -4
- package/src/App/Screens/Configurator/Components/FullScreenView/index.js +17 -17
- package/src/App/Screens/Configurator/Components/FullScreenView/index.test.jsx +1 -1
- package/src/App/Screens/Configurator/Components/PreviewPortal/index.js +23 -32
- package/src/App/Screens/Configurator/Components/Thumbnail/__snapshots__/index.test.jsx.snap +32 -8
- package/src/App/Screens/Configurator/Components/Thumbnail/index.js +8 -5
- package/src/App/Screens/Configurator/ThemeProvider.js +6 -3
- package/src/App/Shared/Components/AccessibleButton/AccessibleButton.js +29 -0
- package/src/App/Shared/Components/AlertDialog/index.js +1 -6
- package/src/App/Shared/Components/AmountPrice/__snapshots__/index.test.jsx.snap +15 -15
- package/src/App/Shared/Components/AmountPrice/index.js +31 -21
- package/src/App/Shared/Components/Analytics/AnalyticsWrapper.js +6 -0
- package/src/App/Shared/Components/AutoFocusDialogContentContainer/AutoFocusDialogContentContainer.jsx +52 -0
- package/src/App/Shared/Components/BulkNames/index.js +11 -6
- package/src/App/Shared/Components/LoadConfiguration/index.js +0 -2
- package/src/App/Shared/Components/PdfDownload/index.js +0 -2
- package/src/App/Shared/Components/SaveConfiguration/index.js +6 -4
- package/src/App/Shared/Components/SendEmail/index.js +0 -2
- package/src/App/Shared/Components/ToolbarList/__snapshots__/ToolbarList.test.js.snap +44 -20
- package/src/App/Shared/Components/ToolbarList/index.js +30 -27
- package/src/App/Shared/Hooks/useDialogId.js +11 -0
- package/src/Shared/Components/CustomDialog.js +60 -43
- package/App/Modules/Creator/Components/LoginForm/Styles.scss +0 -9
- package/App/Modules/Creator/Components/LoginForm/index.js +0 -91
- package/App/Modules/Creator/Components/SavedConfiguration/Styles.scss +0 -19
- package/App/Modules/Creator/Components/SavedConfiguration/index.js +0 -50
- package/App/Modules/Creator/Components/ShareConfiguration/Styles.scss +0 -23
- package/App/Modules/Creator/Components/ShareConfiguration/index.js +0 -165
- package/App/Modules/Creator/Components/StockInformation/index.js +0 -62
- package/App/Modules/Creator/Components/StoreConfigurationForm/Styles.scss +0 -5
- package/App/Modules/Creator/Components/StoreConfigurationForm/index.js +0 -86
- package/App/Modules/Creator/Components/ValidationResult/Styles.scss +0 -45
- package/App/Modules/Creator/Components/ValidationResult/index.js +0 -119
- package/App/Modules/Creator/Components/index.js +0 -57
- package/src/App/Modules/Creator/Components/LoginForm/Styles.scss +0 -9
- package/src/App/Modules/Creator/Components/LoginForm/index.js +0 -69
- package/src/App/Modules/Creator/Components/SavedConfiguration/Styles.scss +0 -19
- package/src/App/Modules/Creator/Components/SavedConfiguration/index.js +0 -37
- package/src/App/Modules/Creator/Components/ShareConfiguration/Styles.scss +0 -23
- package/src/App/Modules/Creator/Components/ShareConfiguration/index.js +0 -161
- package/src/App/Modules/Creator/Components/StockInformation/index.js +0 -39
- package/src/App/Modules/Creator/Components/StoreConfigurationForm/Styles.scss +0 -5
- package/src/App/Modules/Creator/Components/StoreConfigurationForm/index.js +0 -73
- package/src/App/Modules/Creator/Components/ValidationResult/Styles.scss +0 -45
- package/src/App/Modules/Creator/Components/ValidationResult/index.js +0 -89
- package/src/App/Modules/Creator/Components/index.js +0 -51
|
@@ -4,16 +4,22 @@ exports[`OptionAmount renders correctly 1`] = `
|
|
|
4
4
|
<div
|
|
5
5
|
class="OptionAmount-root-4"
|
|
6
6
|
>
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
viewBox="0 0 24 24"
|
|
7
|
+
<button
|
|
8
|
+
class="MuiButtonBase-root AccessibleButton-root-5"
|
|
9
|
+
tabindex="0"
|
|
10
|
+
type="button"
|
|
12
11
|
>
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
<svg
|
|
13
|
+
aria-hidden="true"
|
|
14
|
+
class="MuiSvgIcon-root OptionAmount-plus-2"
|
|
15
|
+
focusable="false"
|
|
16
|
+
viewBox="0 0 24 24"
|
|
17
|
+
>
|
|
18
|
+
<path
|
|
19
|
+
d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
|
|
20
|
+
/>
|
|
21
|
+
</svg>
|
|
22
|
+
</button>
|
|
17
23
|
<div
|
|
18
24
|
class="MuiFormControl-root MuiTextField-root OptionAmount-value-3"
|
|
19
25
|
>
|
|
@@ -28,15 +34,22 @@ exports[`OptionAmount renders correctly 1`] = `
|
|
|
28
34
|
/>
|
|
29
35
|
</div>
|
|
30
36
|
</div>
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
<button
|
|
38
|
+
class="MuiButtonBase-root AccessibleButton-root-5 Mui-disabled"
|
|
39
|
+
disabled=""
|
|
40
|
+
tabindex="-1"
|
|
41
|
+
type="button"
|
|
36
42
|
>
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
<svg
|
|
44
|
+
aria-hidden="true"
|
|
45
|
+
class="MuiSvgIcon-root OptionAmount-minus-1 disable"
|
|
46
|
+
focusable="false"
|
|
47
|
+
viewBox="0 0 24 24"
|
|
48
|
+
>
|
|
49
|
+
<path
|
|
50
|
+
d="M19 13H5v-2h14v2z"
|
|
51
|
+
/>
|
|
52
|
+
</svg>
|
|
53
|
+
</button>
|
|
41
54
|
</div>
|
|
42
55
|
`;
|
|
@@ -6,6 +6,7 @@ import { makeStyles } from '@material-ui/core/styles';
|
|
|
6
6
|
import TextField from '@material-ui/core/TextField';
|
|
7
7
|
import AddIcon from '@material-ui/icons/Add';
|
|
8
8
|
import RemoveIcon from '@material-ui/icons/Remove';
|
|
9
|
+
import AccessibleButton from '../../../../Shared/Components/AccessibleButton/AccessibleButton';
|
|
9
10
|
|
|
10
11
|
const useStyles = makeStyles(
|
|
11
12
|
() => {
|
|
@@ -133,7 +134,9 @@ const OptionAmount = ({ option, onAmountChange, onSelect, view }) => {
|
|
|
133
134
|
|
|
134
135
|
return (
|
|
135
136
|
<div className={clsx(classes.root, view)} onClick={onAmountClicked}>
|
|
136
|
-
<
|
|
137
|
+
<AccessibleButton onClick={plus}>
|
|
138
|
+
<AddIcon className={classes.plus} />
|
|
139
|
+
</AccessibleButton>
|
|
137
140
|
<TextField
|
|
138
141
|
value={optionAmount}
|
|
139
142
|
inputRef={textRef}
|
|
@@ -145,7 +148,9 @@ const OptionAmount = ({ option, onAmountChange, onSelect, view }) => {
|
|
|
145
148
|
setTimeout(() => target.select(), 0);
|
|
146
149
|
}}
|
|
147
150
|
/>
|
|
148
|
-
<
|
|
151
|
+
<AccessibleButton onClick={minus} disabled={!optionAmount}>
|
|
152
|
+
<RemoveIcon className={clsx(classes.minus, !optionAmount && 'disable')} />
|
|
153
|
+
</AccessibleButton>
|
|
149
154
|
</div>
|
|
150
155
|
);
|
|
151
156
|
};
|
|
@@ -2,47 +2,51 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`ProductPart renders with horizontal marker 1`] = `
|
|
4
4
|
<div
|
|
5
|
-
class="ProductPart-root-
|
|
5
|
+
class="ProductPart-root-19 horizontal custom-css-component"
|
|
6
6
|
>
|
|
7
7
|
<div
|
|
8
|
-
class="ProductPart-marker-
|
|
8
|
+
class="ProductPart-marker-22 horizontal selected"
|
|
9
9
|
/>
|
|
10
|
-
<
|
|
11
|
-
class="ProductPart-content-
|
|
10
|
+
<button
|
|
11
|
+
class="MuiButtonBase-root AccessibleButton-root-24 ProductPart-content-20 horizontal"
|
|
12
|
+
tabindex="0"
|
|
13
|
+
type="button"
|
|
12
14
|
>
|
|
13
15
|
<i
|
|
14
|
-
class="ProductPart-icon-
|
|
16
|
+
class="ProductPart-icon-21 horizontal"
|
|
15
17
|
style="background-image:url(/images/components/seat.png)"
|
|
16
18
|
/>
|
|
17
19
|
<span
|
|
18
|
-
class="MuiTypography-root ProductPart-rootTypography-
|
|
20
|
+
class="MuiTypography-root ProductPart-rootTypography-23 MuiTypography-body1"
|
|
19
21
|
>
|
|
20
22
|
Seat
|
|
21
23
|
</span>
|
|
22
|
-
</
|
|
24
|
+
</button>
|
|
23
25
|
</div>
|
|
24
26
|
`;
|
|
25
27
|
|
|
26
28
|
exports[`ProductPart renders with vertical marker 1`] = `
|
|
27
29
|
<div
|
|
28
|
-
class="ProductPart-root-
|
|
30
|
+
class="ProductPart-root-13 vertical custom-css-component"
|
|
29
31
|
>
|
|
30
32
|
<div
|
|
31
|
-
class="ProductPart-marker-
|
|
33
|
+
class="ProductPart-marker-16 vertical selected"
|
|
32
34
|
/>
|
|
33
|
-
<
|
|
34
|
-
class="ProductPart-content-
|
|
35
|
+
<button
|
|
36
|
+
class="MuiButtonBase-root AccessibleButton-root-18 ProductPart-content-14 vertical"
|
|
37
|
+
tabindex="0"
|
|
38
|
+
type="button"
|
|
35
39
|
>
|
|
36
40
|
<i
|
|
37
|
-
class="ProductPart-icon-
|
|
41
|
+
class="ProductPart-icon-15 vertical"
|
|
38
42
|
style="background-image:url(/images/components/seat.png)"
|
|
39
43
|
/>
|
|
40
44
|
<span
|
|
41
|
-
class="MuiTypography-root ProductPart-rootTypography-
|
|
45
|
+
class="MuiTypography-root ProductPart-rootTypography-17 MuiTypography-body1"
|
|
42
46
|
>
|
|
43
47
|
Seat
|
|
44
48
|
</span>
|
|
45
|
-
</
|
|
49
|
+
</button>
|
|
46
50
|
</div>
|
|
47
51
|
`;
|
|
48
52
|
|
|
@@ -53,8 +57,10 @@ exports[`ProductPart renders without marker 1`] = `
|
|
|
53
57
|
<div
|
|
54
58
|
class="ProductPart-marker-4 vertical "
|
|
55
59
|
/>
|
|
56
|
-
<
|
|
57
|
-
class="ProductPart-content-2 vertical"
|
|
60
|
+
<button
|
|
61
|
+
class="MuiButtonBase-root AccessibleButton-root-6 ProductPart-content-2 vertical"
|
|
62
|
+
tabindex="0"
|
|
63
|
+
type="button"
|
|
58
64
|
>
|
|
59
65
|
<i
|
|
60
66
|
class="ProductPart-icon-3 vertical"
|
|
@@ -65,29 +71,31 @@ exports[`ProductPart renders without marker 1`] = `
|
|
|
65
71
|
>
|
|
66
72
|
Seat
|
|
67
73
|
</span>
|
|
68
|
-
</
|
|
74
|
+
</button>
|
|
69
75
|
</div>
|
|
70
76
|
`;
|
|
71
77
|
|
|
72
78
|
exports[`ProductPart renders without marker when menu is closed 1`] = `
|
|
73
79
|
<div
|
|
74
|
-
class="ProductPart-root-
|
|
80
|
+
class="ProductPart-root-7 vertical custom-css-component"
|
|
75
81
|
>
|
|
76
82
|
<div
|
|
77
|
-
class="ProductPart-marker-
|
|
83
|
+
class="ProductPart-marker-10 vertical "
|
|
78
84
|
/>
|
|
79
|
-
<
|
|
80
|
-
class="ProductPart-content-
|
|
85
|
+
<button
|
|
86
|
+
class="MuiButtonBase-root AccessibleButton-root-12 ProductPart-content-8 vertical"
|
|
87
|
+
tabindex="0"
|
|
88
|
+
type="button"
|
|
81
89
|
>
|
|
82
90
|
<i
|
|
83
|
-
class="ProductPart-icon-
|
|
91
|
+
class="ProductPart-icon-9 vertical"
|
|
84
92
|
style="background-image:url(/images/components/seat.png)"
|
|
85
93
|
/>
|
|
86
94
|
<span
|
|
87
|
-
class="MuiTypography-root ProductPart-rootTypography-
|
|
95
|
+
class="MuiTypography-root ProductPart-rootTypography-11 MuiTypography-body1"
|
|
88
96
|
>
|
|
89
97
|
Seat
|
|
90
98
|
</span>
|
|
91
|
-
</
|
|
99
|
+
</button>
|
|
92
100
|
</div>
|
|
93
101
|
`;
|
|
@@ -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 AccessibleButton from '../../../../Shared/Components/AccessibleButton/AccessibleButton';
|
|
10
11
|
|
|
11
12
|
const ProductPart = ({
|
|
12
13
|
displaySwitchedOptions,
|
|
@@ -60,20 +61,14 @@ const ProductPart = ({
|
|
|
60
61
|
return (
|
|
61
62
|
<div className={clsx(classes.root, direction, customClassName('component'))} ref={setAnchorRef}>
|
|
62
63
|
<div className={`${classes.marker} ${direction} ${selectedAndVisible ? 'selected' : ''}`} />
|
|
63
|
-
<
|
|
64
|
+
<AccessibleButton className={`${classes.content} ${direction}`} onClick={onClick}>
|
|
64
65
|
{displayImage()}
|
|
65
66
|
{displayText()}
|
|
66
|
-
</
|
|
67
|
+
</AccessibleButton>
|
|
67
68
|
</div>
|
|
68
69
|
);
|
|
69
70
|
};
|
|
70
71
|
|
|
71
|
-
const MARKER_POSITION = {
|
|
72
|
-
left: 'left',
|
|
73
|
-
right: 'right',
|
|
74
|
-
top: 'top',
|
|
75
|
-
};
|
|
76
|
-
|
|
77
72
|
ProductPart.defaultProps = {
|
|
78
73
|
optionclassification: {},
|
|
79
74
|
onSelect: () => {},
|
|
@@ -95,14 +90,9 @@ ProductPart.propTypes = {
|
|
|
95
90
|
export const StyledProductPart = withStyles(
|
|
96
91
|
theme => {
|
|
97
92
|
const captionMaxHeight = `calc(${theme.creator.productPart.captionPaddingTop} + ${theme.creator.productPart.lineHeight} * 2)`;
|
|
98
|
-
const iconMaxHeigth = `calc(${theme.creator.productPart.itemSize} - ${captionMaxHeight}
|
|
93
|
+
const iconMaxHeigth = `calc(${theme.creator.productPart.itemSize} - ${captionMaxHeight})`;
|
|
99
94
|
|
|
100
|
-
const iconSizeWithoutMarker = `calc(${theme.creator.productPart.itemSize}
|
|
101
|
-
|
|
102
|
-
const contentMargin = {
|
|
103
|
-
right: '0 0 0 ' + theme.creator.productPart.spaceBetweenItemAndMarker,
|
|
104
|
-
left: '0 ' + theme.creator.productPart.spaceBetweenItemAndMarker + ' 0 0',
|
|
105
|
-
};
|
|
95
|
+
const iconSizeWithoutMarker = `calc(${theme.creator.productPart.itemSize})`;
|
|
106
96
|
|
|
107
97
|
return {
|
|
108
98
|
root: {
|
|
@@ -131,22 +121,21 @@ export const StyledProductPart = withStyles(
|
|
|
131
121
|
position: 'relative',
|
|
132
122
|
|
|
133
123
|
'&.horizontal': {
|
|
124
|
+
padding: theme.spacing(1, 0, 0, 0),
|
|
134
125
|
width: theme.creator.productPart.itemSize,
|
|
135
126
|
height: 'auto',
|
|
136
|
-
float: MARKER_POSITION.top,
|
|
137
127
|
whiteSpace: 'normal',
|
|
138
128
|
'& span': {
|
|
139
129
|
marginBottom: 0,
|
|
140
130
|
},
|
|
131
|
+
[theme.breakpoints.down('xs')]: {
|
|
132
|
+
padding: theme.spacing(0.5, 0, 0, 0),
|
|
133
|
+
},
|
|
141
134
|
},
|
|
142
135
|
'&.vertical': {
|
|
136
|
+
padding: theme.spacing(0, 0, 1, 0),
|
|
143
137
|
width: iconSizeWithoutMarker,
|
|
144
|
-
|
|
145
|
-
float: theme.creator.productPartsList.markerVerticalPosition,
|
|
146
|
-
margin:
|
|
147
|
-
theme.creator.productPartsList.markerVerticalPosition === MARKER_POSITION.right
|
|
148
|
-
? contentMargin.left
|
|
149
|
-
: contentMargin.right,
|
|
138
|
+
margin: 0,
|
|
150
139
|
},
|
|
151
140
|
},
|
|
152
141
|
icon: {
|
|
@@ -158,6 +147,9 @@ export const StyledProductPart = withStyles(
|
|
|
158
147
|
'&.horizontal': {
|
|
159
148
|
width: theme.creator.productPart.itemSize,
|
|
160
149
|
height: 'calc(0.75*' + theme.creator.productPart.itemSize + ')',
|
|
150
|
+
[theme.breakpoints.down('xs')]: {
|
|
151
|
+
maxHeight: `calc(0.75 * ${iconMaxHeigth})`,
|
|
152
|
+
},
|
|
161
153
|
},
|
|
162
154
|
'&.vertical': {
|
|
163
155
|
width: iconSizeWithoutMarker,
|
|
@@ -172,24 +164,25 @@ export const StyledProductPart = withStyles(
|
|
|
172
164
|
},
|
|
173
165
|
'&.vertical': {
|
|
174
166
|
width: theme.creator.productPart.markerThickness,
|
|
175
|
-
|
|
176
|
-
float: theme.creator.productPartsList.markerVerticalPosition,
|
|
167
|
+
margin: theme.spacing(0, 0, 1, 0),
|
|
177
168
|
},
|
|
178
169
|
'&.selected': {
|
|
179
170
|
[theme.breakpoints.down('sm')]: {
|
|
180
171
|
marginBottom: 4,
|
|
181
172
|
},
|
|
173
|
+
[theme.breakpoints.down('xs')]: {
|
|
174
|
+
marginBottom: 0,
|
|
175
|
+
},
|
|
182
176
|
backgroundColor: theme.palette.primary.main,
|
|
183
177
|
},
|
|
184
178
|
},
|
|
185
179
|
rootTypography: {
|
|
186
|
-
|
|
187
|
-
marginBottom: 5,
|
|
180
|
+
paddingTop: theme.creator.productPart.captionPaddingTop,
|
|
188
181
|
display: '-webkit-box',
|
|
189
182
|
overflow: 'hidden',
|
|
190
183
|
wordWrap: 'break-word',
|
|
191
184
|
maxWidth: theme.creator.productPart.itemSize,
|
|
192
|
-
lineHeight:
|
|
185
|
+
lineHeight: theme.creator.productPart.lineHeight,
|
|
193
186
|
boxOrient: 'vertical',
|
|
194
187
|
lineClamp: 3,
|
|
195
188
|
minHeight: 20,
|
|
@@ -88,7 +88,6 @@ const styles = theme => ({
|
|
|
88
88
|
|
|
89
89
|
'&.horizontal': {
|
|
90
90
|
bottom: 2,
|
|
91
|
-
height: 130,
|
|
92
91
|
[theme.breakpoints.down('xs')]: {
|
|
93
92
|
width: '100%',
|
|
94
93
|
left: 0,
|
|
@@ -223,6 +222,18 @@ const DefaultLayout = ({
|
|
|
223
222
|
})}
|
|
224
223
|
</div>
|
|
225
224
|
<div className={clsx(classes.outerContainer, !displayVerticalList && 'withBottomList')}>
|
|
225
|
+
<div
|
|
226
|
+
className={`${classes.productsList} ${
|
|
227
|
+
displayVerticalList ? 'vertical' : 'horizontal'
|
|
228
|
+
}`}
|
|
229
|
+
>
|
|
230
|
+
{renderProductsList({
|
|
231
|
+
area: 'products',
|
|
232
|
+
width,
|
|
233
|
+
classes,
|
|
234
|
+
displayVerticalList,
|
|
235
|
+
})}
|
|
236
|
+
</div>
|
|
226
237
|
<div
|
|
227
238
|
className={`${classes.container} ${
|
|
228
239
|
isPortraitMode ? classes.containerTabletPortrait : ''
|
|
@@ -252,18 +263,6 @@ const DefaultLayout = ({
|
|
|
252
263
|
classes,
|
|
253
264
|
})}
|
|
254
265
|
</div>
|
|
255
|
-
<div
|
|
256
|
-
className={`${classes.productsList} ${
|
|
257
|
-
displayVerticalList ? 'vertical' : 'horizontal'
|
|
258
|
-
}`}
|
|
259
|
-
>
|
|
260
|
-
{renderProductsList({
|
|
261
|
-
area: 'products',
|
|
262
|
-
width,
|
|
263
|
-
classes,
|
|
264
|
-
displayVerticalList,
|
|
265
|
-
})}
|
|
266
|
-
</div>
|
|
267
266
|
</div>
|
|
268
267
|
</React.Fragment>
|
|
269
268
|
)
|
|
@@ -107,6 +107,8 @@ class AddImagePanel extends React.Component {
|
|
|
107
107
|
|
|
108
108
|
const applyButtonDisabled = isEmpty(selectedImage);
|
|
109
109
|
|
|
110
|
+
const dialogTitleId = 'gallery-image-dialog-title';
|
|
111
|
+
|
|
110
112
|
return (
|
|
111
113
|
<Dialog
|
|
112
114
|
open={open}
|
|
@@ -115,9 +117,10 @@ class AddImagePanel extends React.Component {
|
|
|
115
117
|
onClose={onClose}
|
|
116
118
|
fullScreen={width === 'sm' || width === 'xs'}
|
|
117
119
|
classes={{ paper: classes.root }}
|
|
120
|
+
aria-labelledby={dialogTitleId}
|
|
118
121
|
>
|
|
119
122
|
<DialogTitle disableTypography={true}>
|
|
120
|
-
<Typography variant="h5" className={classes.title}>
|
|
123
|
+
<Typography variant="h5" className={classes.title} id={dialogTitleId}>
|
|
121
124
|
{t('imageLibrary.gallery')}
|
|
122
125
|
</Typography>
|
|
123
126
|
<Icon aria-label="close" className={classes.closeButton} onClick={onClose}>
|
|
@@ -64,8 +64,6 @@ export const CustomFontOverlay = props => {
|
|
|
64
64
|
<CustomDialog
|
|
65
65
|
open={open}
|
|
66
66
|
onClose={closeOverlay}
|
|
67
|
-
aria-labelledby="alert-dialog-title"
|
|
68
|
-
aria-describedby="alert-dialog-description"
|
|
69
67
|
onCancel={closeOverlay}
|
|
70
68
|
dialogTitle={t('textControlbox.addCustomFont')}
|
|
71
69
|
>
|
|
@@ -237,8 +237,6 @@ class ImageControlbox extends React.Component {
|
|
|
237
237
|
<CustomDialog
|
|
238
238
|
open={printQualityInfoDialogOpen}
|
|
239
239
|
onClose={this.handlePrintQualityInfoDialogClose}
|
|
240
|
-
aria-labelledby="alert-dialog-title"
|
|
241
|
-
aria-describedby="alert-dialog-description"
|
|
242
240
|
>
|
|
243
241
|
<DialogContent>
|
|
244
242
|
<DialogContentText id="alert-dialog-description">
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import isObject from 'lodash/isObject';
|
|
2
2
|
import reduce from 'lodash/reduce';
|
|
3
|
+
import get from 'lodash/get';
|
|
3
4
|
|
|
4
5
|
import {
|
|
5
6
|
REQUEST_DATA,
|
|
@@ -13,6 +14,7 @@ import {
|
|
|
13
14
|
const initialState = {
|
|
14
15
|
sources: {},
|
|
15
16
|
isFetching: false,
|
|
17
|
+
has404Error: false,
|
|
16
18
|
};
|
|
17
19
|
|
|
18
20
|
function getSourceState(action) {
|
|
@@ -61,6 +63,10 @@ function getSourceState(action) {
|
|
|
61
63
|
}
|
|
62
64
|
}
|
|
63
65
|
|
|
66
|
+
function has404Error(sourceState) {
|
|
67
|
+
return get(sourceState, 'error.response.status', null) === 404;
|
|
68
|
+
}
|
|
69
|
+
|
|
64
70
|
export default function apiReducer(state = initialState, action = {}) {
|
|
65
71
|
switch (action.type) {
|
|
66
72
|
case REQUEST_DATA:
|
|
@@ -88,6 +94,7 @@ export default function apiReducer(state = initialState, action = {}) {
|
|
|
88
94
|
},
|
|
89
95
|
false
|
|
90
96
|
),
|
|
97
|
+
has404Error: has404Error(sourceState),
|
|
91
98
|
};
|
|
92
99
|
}
|
|
93
100
|
|
|
@@ -28,13 +28,11 @@ class Confirm extends React.Component {
|
|
|
28
28
|
<CustomDialog
|
|
29
29
|
open={confirm !== null}
|
|
30
30
|
onClose={onCancel}
|
|
31
|
-
aria-labelledby="alert-dialog-title"
|
|
32
|
-
aria-describedby="alert-dialog-description"
|
|
33
31
|
dialogTitle={t('errorDialogTitle')}
|
|
34
32
|
onCancel={onCancel}
|
|
35
33
|
>
|
|
36
34
|
<DialogContent>
|
|
37
|
-
<DialogContentText
|
|
35
|
+
<DialogContentText>{message}</DialogContentText>
|
|
38
36
|
</DialogContent>
|
|
39
37
|
<DialogActions>
|
|
40
38
|
<Button onClick={onCancel} variant="contained">
|
|
@@ -22,18 +22,9 @@ class Error extends React.Component {
|
|
|
22
22
|
|
|
23
23
|
return (
|
|
24
24
|
message && (
|
|
25
|
-
<CustomDialog
|
|
26
|
-
open={true}
|
|
27
|
-
onClose={this.handleClose}
|
|
28
|
-
aria-labelledby="alert-dialog-title"
|
|
29
|
-
aria-describedby="alert-dialog-description"
|
|
30
|
-
dialogTitle={t('errorDialogTitle')}
|
|
31
|
-
>
|
|
25
|
+
<CustomDialog open={true} onClose={this.handleClose} dialogTitle={t('errorDialogTitle')}>
|
|
32
26
|
<DialogContent>
|
|
33
|
-
<DialogContentText
|
|
34
|
-
id="alert-dialog-description"
|
|
35
|
-
dangerouslySetInnerHTML={{ __html: message }}
|
|
36
|
-
/>
|
|
27
|
+
<DialogContentText dangerouslySetInnerHTML={{ __html: message }} />
|
|
37
28
|
</DialogContent>
|
|
38
29
|
<DialogActions>
|
|
39
30
|
<Button onClick={this.handleClose} color="primary">
|
package/src/App/Screens/Configurator/Components/FullScreenView/__snapshots__/index.test.jsx.snap
CHANGED
|
@@ -4,11 +4,10 @@ exports[`Screens/Configurator/Components/FullScreenView renders correctly 1`] =
|
|
|
4
4
|
<div
|
|
5
5
|
class="MuiGrid-root MuiGrid-container MuiGrid-direction-xs-column MuiGrid-align-items-xs-center MuiGrid-justify-content-xs-space-between"
|
|
6
6
|
>
|
|
7
|
-
<
|
|
8
|
-
aria-disabled="false"
|
|
7
|
+
<button
|
|
9
8
|
class="MuiButtonBase-root MuiButton-root MuiButton-text FullScreenView-buttonView-8 custom-css-preview-button"
|
|
10
|
-
role="button"
|
|
11
9
|
tabindex="0"
|
|
10
|
+
type="button"
|
|
12
11
|
>
|
|
13
12
|
<span
|
|
14
13
|
class="MuiButton-label"
|
|
@@ -25,6 +24,6 @@ exports[`Screens/Configurator/Components/FullScreenView renders correctly 1`] =
|
|
|
25
24
|
configurator.previewButton
|
|
26
25
|
</p>
|
|
27
26
|
</span>
|
|
28
|
-
</
|
|
27
|
+
</button>
|
|
29
28
|
</div>
|
|
30
29
|
`;
|
|
@@ -80,7 +80,6 @@ const styles = theme => ({
|
|
|
80
80
|
export const PreviewButton = ({ classes, bottom, top, onClick }) => (
|
|
81
81
|
<AnalyticsWrapper targetId="preview_open">
|
|
82
82
|
<Button
|
|
83
|
-
component="div"
|
|
84
83
|
className={clsx(
|
|
85
84
|
classes.button,
|
|
86
85
|
bottom && classes.buttonBottom,
|
|
@@ -157,25 +156,26 @@ class FullScreenView extends React.Component {
|
|
|
157
156
|
renderButtonOnTop,
|
|
158
157
|
} = this.props;
|
|
159
158
|
|
|
160
|
-
const topPreviewButton = renderTopPreviewButton({
|
|
159
|
+
const topPreviewButton = renderTopPreviewButton({
|
|
160
|
+
...this.props,
|
|
161
|
+
onClick: this.openPreview,
|
|
162
|
+
});
|
|
161
163
|
|
|
162
|
-
return
|
|
163
|
-
<div className={classes.fullScreenWrapper}>
|
|
164
|
-
<PreviewPortal
|
|
165
|
-
closePreviewMode={this.closePreview}
|
|
166
|
-
thumbnailClick={this.handleViewChange}
|
|
167
|
-
previewOpen={previewOpen}
|
|
168
|
-
hasItems={hasItems}
|
|
169
|
-
dialogStyle={dialogStyle}
|
|
170
|
-
>
|
|
171
|
-
{children}
|
|
172
|
-
</PreviewPortal>
|
|
173
|
-
</div>
|
|
174
|
-
) : (
|
|
164
|
+
return (
|
|
175
165
|
<React.Fragment>
|
|
166
|
+
{previewOpen && (
|
|
167
|
+
<PreviewPortal
|
|
168
|
+
closePreviewMode={this.closePreview}
|
|
169
|
+
thumbnailClick={this.handleViewChange}
|
|
170
|
+
previewOpen={previewOpen}
|
|
171
|
+
hasItems={hasItems}
|
|
172
|
+
dialogStyle={dialogStyle}
|
|
173
|
+
>
|
|
174
|
+
{children}
|
|
175
|
+
</PreviewPortal>
|
|
176
|
+
)}
|
|
176
177
|
{topPreviewButton}
|
|
177
|
-
|
|
178
|
-
{children}
|
|
178
|
+
{!previewOpen && children}
|
|
179
179
|
{showDesignViewList ? (
|
|
180
180
|
<Grid
|
|
181
181
|
container
|
|
@@ -18,6 +18,6 @@ describe('Screens/Configurator/Components/FullScreenView', () => {
|
|
|
18
18
|
/>
|
|
19
19
|
);
|
|
20
20
|
expect(wrapper.find('div.custom-css-views')).toHaveLength(1);
|
|
21
|
-
expect(wrapper.find('
|
|
21
|
+
expect(wrapper.find('button.custom-css-preview-button')).toHaveLength(1);
|
|
22
22
|
});
|
|
23
23
|
});
|