@configuratorware/configurator-frontendgui 1.49.9 → 1.50.1
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
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
@media screen {
|
|
2
|
-
.savedconfiguration {
|
|
3
|
-
display: none;
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
@media print {
|
|
8
|
-
.savedconfiguration {
|
|
9
|
-
padding-top: 30px;
|
|
10
|
-
|
|
11
|
-
.savedconfiguration-code {
|
|
12
|
-
font-size: 26px;
|
|
13
|
-
font-weight: bold;
|
|
14
|
-
}
|
|
15
|
-
.savedconfiguration-link {
|
|
16
|
-
font-weight: bold;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './Styles.scss';
|
|
3
|
-
import get from 'lodash/get';
|
|
4
|
-
|
|
5
|
-
import { T } from 'Framework/i18n';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
|
-
|
|
8
|
-
class SavedConfiguration extends React.Component {
|
|
9
|
-
static propTypes = {
|
|
10
|
-
savedconfiguration: PropTypes.object,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
render() {
|
|
14
|
-
const { savedconfiguration } = this.props;
|
|
15
|
-
|
|
16
|
-
const code = get(savedconfiguration, 'code', false);
|
|
17
|
-
const link = get(savedconfiguration, 'shareLink', false);
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<div className="savedconfiguration">
|
|
21
|
-
{code && (
|
|
22
|
-
<div>
|
|
23
|
-
{T('savedConfiguration.code')} <span className="savedconfiguration-code">{code}</span>
|
|
24
|
-
</div>
|
|
25
|
-
)}
|
|
26
|
-
{link && (
|
|
27
|
-
<div>
|
|
28
|
-
{T('savedConfiguration.sharingLink')}{' '}
|
|
29
|
-
<span className="savedconfiguration-link">{link}</span>
|
|
30
|
-
</div>
|
|
31
|
-
)}
|
|
32
|
-
</div>
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export default SavedConfiguration;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
.shareconfiguration {
|
|
2
|
-
|
|
3
|
-
.shareconfiguration-link {
|
|
4
|
-
padding: 10px 0;
|
|
5
|
-
text-align: center;
|
|
6
|
-
font-weight: bold;
|
|
7
|
-
display: block;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.shareconfiguration-media {
|
|
11
|
-
text-align: center;
|
|
12
|
-
font-size: 2em;
|
|
13
|
-
|
|
14
|
-
a {
|
|
15
|
-
padding: 0 15px;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.hidden-email-share-iframe {
|
|
20
|
-
visibility: hidden;
|
|
21
|
-
position: absolute;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { T, translateComponent } from 'Framework/i18n';
|
|
3
|
-
|
|
4
|
-
import './Styles.scss';
|
|
5
|
-
import { getComponent } from 'App/configuration';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
|
-
|
|
8
|
-
export const ShareOnMedia = translateComponent(
|
|
9
|
-
class extends React.Component {
|
|
10
|
-
static propTypes = {
|
|
11
|
-
previewImageURL: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
12
|
-
url: PropTypes.string,
|
|
13
|
-
onClick: PropTypes.func,
|
|
14
|
-
t: PropTypes.func,
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
onClick = (evt, type) => {
|
|
18
|
-
if (this.props.onClick) {
|
|
19
|
-
const { url } = this.props;
|
|
20
|
-
this.props.onClick(evt, type, url);
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
onClickEmail = evt => this.onClick(evt, 'email');
|
|
25
|
-
onClickFacebook = evt => this.onClick(evt, 'facebook');
|
|
26
|
-
onClickTwitter = evt => this.onClick(evt, 'twitter');
|
|
27
|
-
onClickPinterest = evt => this.onClick(evt, 'pinterest');
|
|
28
|
-
|
|
29
|
-
render() {
|
|
30
|
-
const { props } = this;
|
|
31
|
-
const urlEncoded = encodeURIComponent(props.url);
|
|
32
|
-
|
|
33
|
-
const imgUrl = props.previewImageURL !== false ? props.previewImageURL : '';
|
|
34
|
-
const imgUrlEncoded = encodeURIComponent(imgUrl);
|
|
35
|
-
const facebookLink = `https://www.facebook.com/sharer/sharer.php?u=${urlEncoded}`;
|
|
36
|
-
const twitterLink = `https://twitter.com/intent/tweet?text=${props.t(
|
|
37
|
-
'share.twitter.text'
|
|
38
|
-
)}&url=${urlEncoded}`;
|
|
39
|
-
const pinterestLink = `https://pinterest.com/pin/create/button/?url=${urlEncoded}&media=${imgUrlEncoded}&description=`;
|
|
40
|
-
const emailLink = `mailto:?subject=${props.t('share.email.subject')}&body=${props
|
|
41
|
-
.t('share.email.body')
|
|
42
|
-
.replace(/{shareLink}/g, props.url)}`;
|
|
43
|
-
|
|
44
|
-
// the hiden iframe is to prevent triggering of unBeforeUnload in Chrome
|
|
45
|
-
// see https://stackoverflow.com/questions/9740510/mailto-link-in-chrome-is-triggering-window-onbeforeunload-can-i-prevent-this
|
|
46
|
-
|
|
47
|
-
return (
|
|
48
|
-
<div className="shareconfiguration-media">
|
|
49
|
-
<a
|
|
50
|
-
className="email share-email"
|
|
51
|
-
href={emailLink}
|
|
52
|
-
target="hidden-email-share-iframe"
|
|
53
|
-
onClick={this.onClickEmail}
|
|
54
|
-
>
|
|
55
|
-
<i className="ion-ios-email-outline" />
|
|
56
|
-
</a>
|
|
57
|
-
<iframe name="hidden-email-share-iframe" className="hidden-email-share-iframe" />
|
|
58
|
-
|
|
59
|
-
<a
|
|
60
|
-
className="facebook share-facebook"
|
|
61
|
-
href={facebookLink}
|
|
62
|
-
target="_blank"
|
|
63
|
-
rel="noopener noreferrer"
|
|
64
|
-
onClick={this.onClickFacebook}
|
|
65
|
-
>
|
|
66
|
-
<i className="ion-social-facebook-outline" />
|
|
67
|
-
</a>
|
|
68
|
-
<a
|
|
69
|
-
className="twitter share-twitter"
|
|
70
|
-
href={twitterLink}
|
|
71
|
-
target="_blank"
|
|
72
|
-
rel="noopener noreferrer"
|
|
73
|
-
onClick={this.onClickTwitter}
|
|
74
|
-
>
|
|
75
|
-
<i className="ion-social-twitter-outline" />
|
|
76
|
-
</a>
|
|
77
|
-
<a
|
|
78
|
-
className="pinterest share-pinterest"
|
|
79
|
-
href={pinterestLink}
|
|
80
|
-
target="_blank"
|
|
81
|
-
rel="noopener noreferrer"
|
|
82
|
-
onClick={this.onClickPinterest}
|
|
83
|
-
>
|
|
84
|
-
<i className="ion-social-pinterest-outline" />
|
|
85
|
-
</a>
|
|
86
|
-
</div>
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
|
|
92
|
-
class ShareConfiguration extends React.Component {
|
|
93
|
-
static propTypes = {
|
|
94
|
-
workInProgress: PropTypes.bool,
|
|
95
|
-
errorMessage: PropTypes.string,
|
|
96
|
-
code: PropTypes.string,
|
|
97
|
-
previewImageURL: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
98
|
-
shareUrl: PropTypes.string,
|
|
99
|
-
show: PropTypes.bool,
|
|
100
|
-
onClose: PropTypes.func,
|
|
101
|
-
onClickShareButton: PropTypes.func,
|
|
102
|
-
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
render() {
|
|
106
|
-
const Dialog = getComponent('Dialog');
|
|
107
|
-
const {
|
|
108
|
-
workInProgress,
|
|
109
|
-
errorMessage,
|
|
110
|
-
code,
|
|
111
|
-
show,
|
|
112
|
-
onClose,
|
|
113
|
-
onClickShareButton,
|
|
114
|
-
children,
|
|
115
|
-
} = this.props;
|
|
116
|
-
let { shareUrl, previewImageURL } = this.props;
|
|
117
|
-
if (!shareUrl) {
|
|
118
|
-
// if not present trying to generate one..
|
|
119
|
-
shareUrl = window.location.href.match(/.+\//).toString() + 'code:' + code;
|
|
120
|
-
}
|
|
121
|
-
return (
|
|
122
|
-
<Dialog
|
|
123
|
-
show={show}
|
|
124
|
-
relativeTo="parent"
|
|
125
|
-
overlay={true}
|
|
126
|
-
onClose={onClose}
|
|
127
|
-
animation="grow"
|
|
128
|
-
title="shareConfiguration.dialogTitle"
|
|
129
|
-
className="shareconfiguration-dialog"
|
|
130
|
-
>
|
|
131
|
-
{children || (
|
|
132
|
-
<div className="shareconfiguration">
|
|
133
|
-
{workInProgress && <div>{T('shareConfiguration.savingInProgress')}</div>}
|
|
134
|
-
{errorMessage && <div className="error">{T(errorMessage)}</div>}
|
|
135
|
-
{!workInProgress && shareUrl && (
|
|
136
|
-
<div>
|
|
137
|
-
<div>{T('shareConfiguration.successfullySaved')}</div>
|
|
138
|
-
<div>{T('shareConfiguration.infoText')}</div>
|
|
139
|
-
<a
|
|
140
|
-
href={shareUrl}
|
|
141
|
-
target="_blank"
|
|
142
|
-
rel="noopener noreferrer"
|
|
143
|
-
className="shareconfiguration-link"
|
|
144
|
-
>
|
|
145
|
-
{shareUrl}
|
|
146
|
-
</a>
|
|
147
|
-
<ShareOnMedia
|
|
148
|
-
url={shareUrl}
|
|
149
|
-
previewImageURL={previewImageURL}
|
|
150
|
-
onClick={onClickShareButton}
|
|
151
|
-
/>
|
|
152
|
-
</div>
|
|
153
|
-
)}
|
|
154
|
-
</div>
|
|
155
|
-
)}
|
|
156
|
-
</Dialog>
|
|
157
|
-
);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export default ShareConfiguration;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { T } from 'Framework/i18n';
|
|
4
|
-
import { getComponent } from 'App/configuration';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
|
-
|
|
7
|
-
export default class StockInformation extends React.Component {
|
|
8
|
-
static propTypes = {
|
|
9
|
-
option: PropTypes.object,
|
|
10
|
-
show: PropTypes.bool,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
render() {
|
|
14
|
-
const Dialog = getComponent('Dialog');
|
|
15
|
-
const { option, show } = this.props;
|
|
16
|
-
if (!option || !option.stock) {
|
|
17
|
-
return <div />;
|
|
18
|
-
}
|
|
19
|
-
return (
|
|
20
|
-
<Dialog
|
|
21
|
-
show={show}
|
|
22
|
-
title="stockInformation.dialogTitle"
|
|
23
|
-
relativeTo="parent"
|
|
24
|
-
overlay={true}
|
|
25
|
-
onClose={this.onClose}
|
|
26
|
-
animation="grow"
|
|
27
|
-
className={'stockinformation-dialog'}
|
|
28
|
-
>
|
|
29
|
-
<div className="stockinformation">
|
|
30
|
-
<span className="stockinformation-text">
|
|
31
|
-
{T('stockInformation.deliveryTime', {
|
|
32
|
-
date: <span className="stockinformation-date">{option.stock.deliverytime}</span>,
|
|
33
|
-
})}{' '}
|
|
34
|
-
</span>
|
|
35
|
-
</div>
|
|
36
|
-
</Dialog>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { translateComponent } from 'Framework/i18n';
|
|
3
|
-
import get from 'lodash/get';
|
|
4
|
-
|
|
5
|
-
import './Styles.scss';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
|
-
|
|
8
|
-
export class StoreConfigurationForm extends React.Component {
|
|
9
|
-
static propTypes = {
|
|
10
|
-
show: PropTypes.bool,
|
|
11
|
-
onStore: PropTypes.func,
|
|
12
|
-
profile: PropTypes.object,
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
constructor(props) {
|
|
16
|
-
super(props);
|
|
17
|
-
|
|
18
|
-
this.state = {
|
|
19
|
-
isSaved: false,
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
componentDidUpdate(prevProps) {
|
|
24
|
-
this.props.show && !prevProps.show && this.setState({ isSaved: false });
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
onSubmit(e) {
|
|
28
|
-
e.preventDefault();
|
|
29
|
-
this.props.onStore(this.nameInput.value).then(action => {
|
|
30
|
-
this.setState({ isSaved: !get(action, 'data.error') });
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
render() {
|
|
35
|
-
const { show, profile } = this.props;
|
|
36
|
-
|
|
37
|
-
return (
|
|
38
|
-
<div className={'storeconfigurationform' + (show ? ' show' : ' hide')}>
|
|
39
|
-
<div>{this.t('storeConfigurationForm.infoText')}</div>
|
|
40
|
-
|
|
41
|
-
{this.state.isSaved ? (
|
|
42
|
-
<div>{this.t('storeConfigurationForm.savedText')}</div>
|
|
43
|
-
) : (
|
|
44
|
-
<form onSubmit={this.onSubmit.bind(this)}>
|
|
45
|
-
<input
|
|
46
|
-
type="text"
|
|
47
|
-
ref={el => (this.nameInput = el)}
|
|
48
|
-
placeholder={this.t('storeConfigurationForm.name')}
|
|
49
|
-
/>
|
|
50
|
-
|
|
51
|
-
<button type="submit" className="primary-button storeconfigurationform-storeButton">
|
|
52
|
-
{this.t('storeConfigurationForm.storeButton')}
|
|
53
|
-
</button>
|
|
54
|
-
</form>
|
|
55
|
-
)}
|
|
56
|
-
|
|
57
|
-
{profile.error && (
|
|
58
|
-
<div
|
|
59
|
-
className="storeconfigurationform-error"
|
|
60
|
-
dangerouslySetInnerHTML={{
|
|
61
|
-
__html:
|
|
62
|
-
profile.error instanceof Object
|
|
63
|
-
? JSON.stringify(profile.error)
|
|
64
|
-
: profile.error,
|
|
65
|
-
}}
|
|
66
|
-
/>
|
|
67
|
-
)}
|
|
68
|
-
</div>
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export default translateComponent(StoreConfigurationForm);
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
@import "Framework/Mixins";
|
|
2
|
-
@import "Resources/Icons/ioniconsExtend";
|
|
3
|
-
|
|
4
|
-
%iconfix {
|
|
5
|
-
&:before {
|
|
6
|
-
position: absolute;
|
|
7
|
-
left: 0;
|
|
8
|
-
top: -1px;
|
|
9
|
-
font-size: 18px;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.validationresult {
|
|
14
|
-
|
|
15
|
-
.validationresult-item {
|
|
16
|
-
padding: 0 30px 10px 30px;
|
|
17
|
-
position: relative;
|
|
18
|
-
|
|
19
|
-
ul {
|
|
20
|
-
padding-top: 10px;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.error {
|
|
25
|
-
color: inherit;
|
|
26
|
-
@extend %ion-alert-circled;
|
|
27
|
-
@extend %iconfix;
|
|
28
|
-
|
|
29
|
-
&:before, > span {
|
|
30
|
-
color: red;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.warning {
|
|
35
|
-
@extend %ion-information-circled;
|
|
36
|
-
@extend %iconfix;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.validationresult-dialog {
|
|
41
|
-
.dialog {
|
|
42
|
-
max-height: calc(100% - 40px);
|
|
43
|
-
margin: 20px auto;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { T } from 'Framework/i18n';
|
|
3
|
-
import { getComponent } from 'App/configuration';
|
|
4
|
-
|
|
5
|
-
import './Styles.scss';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
|
-
|
|
8
|
-
export default class ValidationResult extends React.Component {
|
|
9
|
-
static propTypes = {
|
|
10
|
-
validationResult: PropTypes.object,
|
|
11
|
-
optionclassifications: PropTypes.array,
|
|
12
|
-
onClose: PropTypes.func,
|
|
13
|
-
show: PropTypes.bool,
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
renderDataValidation() {
|
|
17
|
-
const { validationResult, optionclassifications } = this.props;
|
|
18
|
-
|
|
19
|
-
if (!validationResult || !validationResult.data) {
|
|
20
|
-
return [];
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const errors = [];
|
|
24
|
-
|
|
25
|
-
const missingOptions = [];
|
|
26
|
-
const invalidOptions = [];
|
|
27
|
-
|
|
28
|
-
for (let oc of optionclassifications) {
|
|
29
|
-
const ocv = validationResult.data[oc.identifier];
|
|
30
|
-
|
|
31
|
-
if (ocv) {
|
|
32
|
-
if (ocv.selectedoptions !== true) {
|
|
33
|
-
missingOptions.push(oc.title);
|
|
34
|
-
}
|
|
35
|
-
for (let option of ocv.options) {
|
|
36
|
-
if (option.valid !== true) {
|
|
37
|
-
invalidOptions.push(oc.title);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (missingOptions.length > 0) {
|
|
44
|
-
errors.push(
|
|
45
|
-
<div key="requiredoption" className="validationresult-item error requiredoption">
|
|
46
|
-
{T('validationResult.requiredOption')}
|
|
47
|
-
<ul>
|
|
48
|
-
{missingOptions.map((optionTitle, key) => (
|
|
49
|
-
<li key={key}>{optionTitle}</li>
|
|
50
|
-
))}
|
|
51
|
-
</ul>
|
|
52
|
-
</div>
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
if (invalidOptions.length > 0) {
|
|
57
|
-
errors.push(
|
|
58
|
-
<div key="invalidoption" className="validationresult-item error invalidoption">
|
|
59
|
-
{T('validationResult.invalidOption')}
|
|
60
|
-
<ul>
|
|
61
|
-
{invalidOptions.map((optionTitle, key) => (
|
|
62
|
-
<li key={key}>{optionTitle}</li>
|
|
63
|
-
))}
|
|
64
|
-
</ul>
|
|
65
|
-
</div>
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return errors;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
render() {
|
|
73
|
-
const Dialog = getComponent('Dialog');
|
|
74
|
-
|
|
75
|
-
return (
|
|
76
|
-
<Dialog
|
|
77
|
-
show={this.props.show}
|
|
78
|
-
title="validationResult.dialogTitle"
|
|
79
|
-
relativeTo="parent"
|
|
80
|
-
overlay={true}
|
|
81
|
-
onClose={this.props.onClose}
|
|
82
|
-
animation="grow"
|
|
83
|
-
className={'validationresult-dialog'}
|
|
84
|
-
>
|
|
85
|
-
<div className="validationresult">{this.renderDataValidation()}</div>
|
|
86
|
-
</Dialog>
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import Carousel from 'Framework/Components/Carousel';
|
|
2
|
-
import ConfigurationvariantItem from './ConfigurationvariantItem';
|
|
3
|
-
import ConfigurationvariantSelection from './ConfigurationvariantSelection';
|
|
4
|
-
import Dialog from 'Framework/Components/Dialog';
|
|
5
|
-
import FormattedNumber from './FormattedNumber';
|
|
6
|
-
import FormattedPrice from './FormattedPrice';
|
|
7
|
-
import Optiondetail from './Optiondetail';
|
|
8
|
-
import Price from './Price';
|
|
9
|
-
import Tools from './Tools';
|
|
10
|
-
import ShareConfiguration from './ShareConfiguration';
|
|
11
|
-
import SavedConfiguration from './SavedConfiguration';
|
|
12
|
-
import LoadingOverlay from 'Framework/Components/LoadingOverlay';
|
|
13
|
-
import FastConfiguration from './FastConfiguration';
|
|
14
|
-
import FastConfigurationRow from './FastConfigurationRow';
|
|
15
|
-
import FastConfigurationSelect from './FastConfigurationSelect';
|
|
16
|
-
import Incompatibility from './Incompatibility';
|
|
17
|
-
import ValidationResult from './ValidationResult';
|
|
18
|
-
import StockInformation from './StockInformation';
|
|
19
|
-
import DialogSelect from 'Framework/Components/DialogSelect';
|
|
20
|
-
import LoginForm from './LoginForm';
|
|
21
|
-
import StoreConfigurationForm from './StoreConfigurationForm';
|
|
22
|
-
import CustomTitleEditor from './CustomTitleEditor';
|
|
23
|
-
import ExternalVisualization from './ExternalVisualization';
|
|
24
|
-
import Input from 'Framework/Components/Input';
|
|
25
|
-
|
|
26
|
-
export default {
|
|
27
|
-
Carousel,
|
|
28
|
-
ConfigurationvariantItem,
|
|
29
|
-
ConfigurationvariantSelection,
|
|
30
|
-
Dialog,
|
|
31
|
-
FormattedNumber,
|
|
32
|
-
FormattedPrice,
|
|
33
|
-
Optiondetail,
|
|
34
|
-
Price,
|
|
35
|
-
Tools,
|
|
36
|
-
ShareConfiguration,
|
|
37
|
-
SavedConfiguration,
|
|
38
|
-
LoadingOverlay,
|
|
39
|
-
FastConfiguration,
|
|
40
|
-
FastConfigurationRow,
|
|
41
|
-
FastConfigurationSelect,
|
|
42
|
-
Incompatibility,
|
|
43
|
-
ValidationResult,
|
|
44
|
-
StockInformation,
|
|
45
|
-
DialogSelect,
|
|
46
|
-
LoginForm,
|
|
47
|
-
StoreConfigurationForm,
|
|
48
|
-
CustomTitleEditor,
|
|
49
|
-
ExternalVisualization,
|
|
50
|
-
Input,
|
|
51
|
-
};
|