kitchen-simulator 5.0.0-test.6 → 5.0.0-test.8

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.
Files changed (178) hide show
  1. package/package.json +23 -3
  2. package/src/components/_export.js +11 -0
  3. package/src/components/viewer3d/scene-creator.js +23 -26
  4. package/src/components/viewer3d/viewer3d.js +18 -18
  5. package/src/components/catalog-view/catalog-breadcrumb.jsx +0 -53
  6. package/src/components/catalog-view/catalog-item.jsx +0 -229
  7. package/src/components/catalog-view/catalog-list.jsx +0 -173
  8. package/src/components/catalog-view/catalog-page-item.jsx +0 -110
  9. package/src/components/catalog-view/catalog-turn-back-page-item.jsx +0 -80
  10. package/src/components/configurator/custom-configurator.jsx +0 -77
  11. package/src/components/configurator/project-configurator.jsx +0 -120
  12. package/src/components/export.js +0 -36
  13. package/src/components/firstsetting/button/styles.js +0 -223
  14. package/src/components/firstsetting/export.js +0 -9
  15. package/src/components/firstsetting/firstsetting-content-button.jsx +0 -198
  16. package/src/components/firstsetting/firstsetting-toggle-button.jsx +0 -101
  17. package/src/components/firstsetting/firstsetting.jsx +0 -814
  18. package/src/components/footerbar/button/ControlButton.jsx +0 -43
  19. package/src/components/footerbar/button/DirectionButton.jsx +0 -54
  20. package/src/components/footerbar/button/DirectionPanSpinButton.jsx +0 -36
  21. package/src/components/footerbar/button/ToggleButton.jsx +0 -58
  22. package/src/components/footerbar/button/ToggleConvertButton.jsx +0 -48
  23. package/src/components/footerbar/button/ToggleMeasureButton.jsx +0 -33
  24. package/src/components/footerbar/button/styles.js +0 -217
  25. package/src/components/footerbar/export.js +0 -9
  26. package/src/components/footerbar/footer-content-button.jsx +0 -198
  27. package/src/components/footerbar/footer-toggle-button.jsx +0 -101
  28. package/src/components/footerbar/footerbar.jsx +0 -1103
  29. package/src/components/footerbar/styles.js +0 -263
  30. package/src/components/header/button/MenuButton.jsx +0 -46
  31. package/src/components/header/button/SaveButton.jsx +0 -54
  32. package/src/components/header/button/styles.js +0 -181
  33. package/src/components/header/export.js +0 -5
  34. package/src/components/header/header.jsx +0 -631
  35. package/src/components/header/header.style.css +0 -47
  36. package/src/components/header/styles.js +0 -320
  37. package/src/components/login/Login.js +0 -77
  38. package/src/components/login/LoginForm/index.js +0 -108
  39. package/src/components/login/Register.js +0 -83
  40. package/src/components/login/RegisterForm/index.js +0 -171
  41. package/src/components/login/jwtService.js +0 -201
  42. package/src/components/login/style.css +0 -158
  43. package/src/components/login/style.scss +0 -260
  44. package/src/components/myprojects/export.js +0 -5
  45. package/src/components/myprojects/index.jsx +0 -445
  46. package/src/components/myprojects/styles.js +0 -241
  47. package/src/components/sidebar/custom-accordion.jsx +0 -48
  48. package/src/components/sidebar/export.js +0 -15
  49. package/src/components/sidebar/panel-element-editor/attributes-editor/attributes-editor.jsx +0 -73
  50. package/src/components/sidebar/panel-element-editor/attributes-editor/confirm-popup.jsx +0 -101
  51. package/src/components/sidebar/panel-element-editor/attributes-editor/hole-attributes-editor.jsx +0 -149
  52. package/src/components/sidebar/panel-element-editor/attributes-editor/item-attributes-editor.jsx +0 -316
  53. package/src/components/sidebar/panel-element-editor/attributes-editor/line-attributes-editor.jsx +0 -108
  54. package/src/components/sidebar/panel-element-editor/element-editor.jsx +0 -1070
  55. package/src/components/sidebar/panel-element-editor/multi-elements-editor.jsx +0 -0
  56. package/src/components/sidebar/panel-element-editor/panel-element-editor.jsx +0 -104
  57. package/src/components/sidebar/panel-element-editor/panel-multi-elements-editor.jsx +0 -155
  58. package/src/components/sidebar/panel-group-editor.jsx +0 -272
  59. package/src/components/sidebar/panel-groups.jsx +0 -310
  60. package/src/components/sidebar/panel-guides.jsx +0 -192
  61. package/src/components/sidebar/panel-layer-elements.jsx +0 -298
  62. package/src/components/sidebar/panel-layers.jsx +0 -381
  63. package/src/components/sidebar/panel.jsx +0 -71
  64. package/src/components/sidebar/sidebar.jsx +0 -106
  65. package/src/components/sidebar/toolbar-panel.jsx +0 -139
  66. package/src/components/sign/export.js +0 -7
  67. package/src/components/sign/main/index.jsx +0 -523
  68. package/src/components/sign/main/styles.js +0 -163
  69. package/src/components/toolbar/button/ControlButton.jsx +0 -41
  70. package/src/components/toolbar/button/DirectionButton.jsx +0 -34
  71. package/src/components/toolbar/button/RightButton.jsx +0 -103
  72. package/src/components/toolbar/button/ToggleButton.jsx +0 -41
  73. package/src/components/toolbar/button/index.jsx +0 -55
  74. package/src/components/toolbar/button/styles.js +0 -127
  75. package/src/components/toolbar/components/DoorStyleMenu.jsx +0 -103
  76. package/src/components/toolbar/components/Pricing.jsx +0 -126
  77. package/src/components/toolbar/components/ReviewForQuote.jsx +0 -635
  78. package/src/components/toolbar/export.js +0 -21
  79. package/src/components/toolbar/main/Alert.js +0 -122
  80. package/src/components/toolbar/main/TakePictureModal.jsx +0 -104
  81. package/src/components/toolbar/main/confirm-popup.jsx +0 -99
  82. package/src/components/toolbar/main/index.jsx +0 -5687
  83. package/src/components/toolbar/main/lShaped.json +0 -311
  84. package/src/components/toolbar/main/longNarrow.json +0 -238
  85. package/src/components/toolbar/main/myComponents.js +0 -123
  86. package/src/components/toolbar/main/oRectangle.json +0 -220
  87. package/src/components/toolbar/main/rectangle.json +0 -238
  88. package/src/components/toolbar/main/style.css +0 -107
  89. package/src/components/toolbar/main/styles.js +0 -696
  90. package/src/components/toolbar/plugin-item.jsx +0 -123
  91. package/src/components/toolbar/popup/appliance/appliance-category/index.jsx +0 -73
  92. package/src/components/toolbar/popup/appliance/choose-appliance/index.jsx +0 -102
  93. package/src/components/toolbar/popup/appliance/index.jsx +0 -83
  94. package/src/components/toolbar/popup/autosaveprompt/index.jsx +0 -150
  95. package/src/components/toolbar/popup/autosaveprompt/styles.css +0 -64
  96. package/src/components/toolbar/popup/autosaveprompt/styles.js +0 -40
  97. package/src/components/toolbar/popup/cabinet/cabinet-category/index.jsx +0 -73
  98. package/src/components/toolbar/popup/cabinet/choose-product/index.jsx +0 -119
  99. package/src/components/toolbar/popup/cabinet/index.jsx +0 -85
  100. package/src/components/toolbar/popup/doorStyle/choose-style/index.jsx +0 -63
  101. package/src/components/toolbar/popup/doorStyle/index.jsx +0 -71
  102. package/src/components/toolbar/popup/doorStyle/style-category/index.jsx +0 -139
  103. package/src/components/toolbar/popup/downloadsummary/downloadSummaryContext.js +0 -2
  104. package/src/components/toolbar/popup/downloadsummary/downloadSummaryTemp.jsx +0 -157
  105. package/src/components/toolbar/popup/downloadsummary/index.jsx +0 -643
  106. package/src/components/toolbar/popup/downloadsummary/show2D/show2DView.jsx +0 -51
  107. package/src/components/toolbar/popup/downloadsummary/show2D/viewer2DDownLoad.jsx +0 -175
  108. package/src/components/toolbar/popup/downloadsummary/show3D/show3DView.jsx +0 -283
  109. package/src/components/toolbar/popup/downloadsummary/show3D/viewer3DDownLoad.jsx +0 -2257
  110. package/src/components/toolbar/popup/downloadsummary/showCabinetInfo.js +0 -93
  111. package/src/components/toolbar/popup/downloadsummary/showElevation/showElevationView.jsx +0 -132
  112. package/src/components/toolbar/popup/downloadsummary/showElevation/viewer3DElevationDownload.jsx +0 -2198
  113. package/src/components/toolbar/popup/downloadsummary/showElevation/viewerElevationDownload.jsx +0 -152
  114. package/src/components/toolbar/popup/downloadsummary/showWarranty.jsx +0 -149
  115. package/src/components/toolbar/popup/downloadsummary/styles.css +0 -177
  116. package/src/components/toolbar/popup/downloadsummary/styles.js +0 -453
  117. package/src/components/toolbar/popup/finishingtouch/category/index.jsx +0 -34
  118. package/src/components/toolbar/popup/finishingtouch/index.jsx +0 -58
  119. package/src/components/toolbar/popup/finishingtouch/material-edit.jsx +0 -112
  120. package/src/components/toolbar/popup/finishingtouch/product/index.jsx +0 -116
  121. package/src/components/toolbar/popup/floorplan/choose-floor/confirm-popup.jsx +0 -101
  122. package/src/components/toolbar/popup/floorplan/choose-floor/index.jsx +0 -254
  123. package/src/components/toolbar/popup/floorplan/choose-floor/lShaped.json +0 -311
  124. package/src/components/toolbar/popup/floorplan/choose-floor/longNarrow.json +0 -238
  125. package/src/components/toolbar/popup/floorplan/choose-floor/oRectangle.json +0 -220
  126. package/src/components/toolbar/popup/floorplan/choose-floor/rectangle.json +0 -238
  127. package/src/components/toolbar/popup/floorplan/choose-floor/styles.js +0 -86
  128. package/src/components/toolbar/popup/floorplan/floor-category/index.jsx +0 -109
  129. package/src/components/toolbar/popup/floorplan/index.jsx +0 -60
  130. package/src/components/toolbar/popup/index.jsx +0 -241
  131. package/src/components/toolbar/popup/newproject/index.jsx +0 -59
  132. package/src/components/toolbar/popup/newproject/styles.css +0 -64
  133. package/src/components/toolbar/popup/newproject/styles.js +0 -41
  134. package/src/components/toolbar/popup/product/appliance.jsx +0 -54
  135. package/src/components/toolbar/popup/product/cabinetproduct.jsx +0 -15
  136. package/src/components/toolbar/popup/product/doorstyle.jsx +0 -58
  137. package/src/components/toolbar/popup/product/doorstyleproduct.jsx +0 -47
  138. package/src/components/toolbar/popup/product/floor.jsx +0 -36
  139. package/src/components/toolbar/popup/product/floorproduct.jsx +0 -42
  140. package/src/components/toolbar/popup/product/index.jsx +0 -36
  141. package/src/components/toolbar/popup/product/primary.jsx +0 -77
  142. package/src/components/toolbar/popup/product/productline.jsx +0 -93
  143. package/src/components/toolbar/popup/product/reviewItem.jsx +0 -427
  144. package/src/components/toolbar/popup/product/reviewMolding.jsx +0 -310
  145. package/src/components/toolbar/popup/product/style.css +0 -54
  146. package/src/components/toolbar/popup/product/styles.js +0 -260
  147. package/src/components/toolbar/popup/savedesign/FullPictureForm.jsx +0 -146
  148. package/src/components/toolbar/popup/savedesign/index.jsx +0 -495
  149. package/src/components/toolbar/popup/savedesign/savedesign.style.css +0 -16
  150. package/src/components/toolbar/popup/savedesign/styles.js +0 -151
  151. package/src/components/toolbar/popup/setDoorStyleOption/index.jsx +0 -87
  152. package/src/components/toolbar/popup/styles.js +0 -909
  153. package/src/components/toolbar/popup/submitforquote/AddToCartOptions.jsx +0 -192
  154. package/src/components/toolbar/popup/submitforquote/CustomerRequestsForm.jsx +0 -96
  155. package/src/components/toolbar/popup/submitforquote/SkipDesignerReview.jsx +0 -54
  156. package/src/components/toolbar/popup/submitforquote/StepDots.jsx +0 -25
  157. package/src/components/toolbar/popup/submitforquote/cart-choice.jsx +0 -116
  158. package/src/components/toolbar/popup/submitforquote/doorstyle-menus.js +0 -38
  159. package/src/components/toolbar/popup/submitforquote/index.jsx +0 -698
  160. package/src/components/toolbar/popup/submitforquote/styles.css +0 -105
  161. package/src/components/toolbar/popup/submitforquote/styles.js +0 -294
  162. package/src/components/toolbar/popup/submitprompt/index.jsx +0 -89
  163. package/src/components/toolbar/popup/submitprompt/styles.css +0 -64
  164. package/src/components/toolbar/popup/submitprompt/styles.js +0 -42
  165. package/src/components/toolbar/toolbar-button.jsx +0 -90
  166. package/src/components/toolbar/toolbar-load-button.jsx +0 -36
  167. package/src/components/toolbar/toolbar-save-button.jsx +0 -32
  168. package/src/components/wizardstep/button/styles.js +0 -677
  169. package/src/components/wizardstep/export.js +0 -5
  170. package/src/components/wizardstep/index.jsx +0 -1372
  171. package/src/components/wizardstep/styles.js +0 -688
  172. package/src/components/wizardstep/wizardstep-content-button.jsx +0 -198
  173. package/src/components/wizardstep/wizardstep-toggle-button.jsx +0 -101
  174. package/src/hooks/useCheckCart.js +0 -38
  175. package/src/hooks/useGetPricesBySku.js +0 -59
  176. package/src/hooks/useValidateToken.js +0 -181
  177. package/src/styles/export.js +0 -7
  178. package/src/styles/tabs.css +0 -40
@@ -1,146 +0,0 @@
1
- import React from 'react';
2
- import {
3
- Typography,
4
- FormControl,
5
- InputLabel,
6
- Select,
7
- MenuItem,
8
- Button,
9
- Box,
10
- CircularProgress
11
- } from '@material-ui/core';
12
- import * as S from './styles';
13
-
14
- const FullPictureForm = ({ onComplete, onSkip, isLoading, initialValues }) => {
15
- const [form, setForm] = React.useState(initialValues);
16
-
17
- const handleChange = e => {
18
- const { name, value } = e.target;
19
- setForm(prev => ({
20
- ...prev,
21
- [name]: value
22
- }));
23
- };
24
-
25
- return (
26
- <Box position="relative">
27
- {isLoading && (
28
- <Box
29
- position="absolute"
30
- top={0}
31
- left={0}
32
- width="100%"
33
- height="100%"
34
- display="flex"
35
- alignItems="center"
36
- justifyContent="center"
37
- zIndex={2}
38
- style={{ opacity: 0.5 }}
39
- >
40
- <CircularProgress size={40} style={{ color: '#4C12A1' }} />
41
- </Box>
42
- )}
43
- <form
44
- style={isLoading ? { pointerEvents: 'none', opacity: 0.5 } : undefined}
45
- >
46
- <FormControl
47
- style={{
48
- marginTop: '10px'
49
- }}
50
- variant="outlined"
51
- fullWidth
52
- margin="normal"
53
- >
54
- <InputLabel>What best describes you?</InputLabel>
55
- <Select
56
- name="userType"
57
- value={form.userType}
58
- onChange={handleChange}
59
- label="What best describes you?"
60
- >
61
- <MenuItem value="">
62
- <em>Select an option</em>
63
- </MenuItem>
64
- <MenuItem value="homeowner">Homeowner</MenuItem>
65
- <MenuItem value="contractor">Contractor</MenuItem>
66
- <MenuItem value="design-professional">Design Professional</MenuItem>
67
- <MenuItem value="real-estate-investor">
68
- Real Estate Investor
69
- </MenuItem>
70
- <MenuItem value="other">Other</MenuItem>
71
- </Select>
72
- </FormControl>
73
-
74
- <FormControl
75
- style={{
76
- marginTop: '10px'
77
- }}
78
- variant="outlined"
79
- fullWidth
80
- margin="normal"
81
- >
82
- <InputLabel>What are you designing today?</InputLabel>
83
- <Select
84
- name="designType"
85
- value={form.designType}
86
- onChange={handleChange}
87
- label="What are you designing today?"
88
- >
89
- <MenuItem value="">
90
- <em>Select an option</em>
91
- </MenuItem>
92
- <MenuItem value="kitchen">Kitchen</MenuItem>
93
- <MenuItem value="bathroom">Bathroom</MenuItem>
94
- <MenuItem value="laundry-room">Laundry Room</MenuItem>
95
- <MenuItem value="tv-room">TV Room</MenuItem>
96
- <MenuItem value="bar-room">Bar Room</MenuItem>
97
- <MenuItem value="office">Office</MenuItem>
98
- <MenuItem value="mudroom">Mudroom</MenuItem>
99
- <MenuItem value="pantry">Pantry</MenuItem>
100
- <MenuItem value="closet">Closet</MenuItem>
101
- <MenuItem value="garage">Garage</MenuItem>
102
- <MenuItem value="outdoor-cabinetry">Outdoor Cabinetry</MenuItem>
103
- <MenuItem value="other">Other</MenuItem>
104
- </Select>
105
- </FormControl>
106
-
107
- <FormControl
108
- style={{
109
- marginTop: '10px'
110
- }}
111
- variant="outlined"
112
- fullWidth
113
- margin="normal"
114
- >
115
- <InputLabel>When do you plan to start your project?</InputLabel>
116
- <Select
117
- name="startTime"
118
- value={form.startTime}
119
- onChange={handleChange}
120
- label="When do you plan to start your project?"
121
- >
122
- <MenuItem value="">
123
- <em>Select an option</em>
124
- </MenuItem>
125
- <MenuItem value="asap">As soon as possible</MenuItem>
126
- <MenuItem value="1-2-months">1–2 months</MenuItem>
127
- <MenuItem value="2-4-months">2–4 months</MenuItem>
128
- <MenuItem value="4-plus-months">4+ months</MenuItem>
129
- <MenuItem value="other">Other</MenuItem>
130
- </Select>
131
- </FormControl>
132
-
133
- <Box display="flex" justifyContent="flex-end" mt={2}>
134
- <S.Button onClick={() => onSkip(form)} disabled={isLoading}>
135
- Skip
136
- </S.Button>
137
- <S.Button onClick={() => onComplete(form)} disabled={isLoading}>
138
- Complete
139
- </S.Button>
140
- </Box>
141
- </form>
142
- </Box>
143
- );
144
- };
145
-
146
- export default FullPictureForm;
@@ -1,495 +0,0 @@
1
- import React from 'react';
2
- import * as S from './styles';
3
- import {
4
- DEFAULT_FONT_FAMILY,
5
- PROJECT_NAME_LENGTH_LIMIT,
6
- TEXT_COLOR_NEUTRAL_1,
7
- TEXT_COLOR_NEUTRAL_0,
8
- TEXT_COLOR_NEUTRAL_2,
9
- LOCAL_STORAGE_CUSTOMER_INFO,
10
- CLIENTS_NAME
11
- } from '../../../../constants';
12
- import { emailValidation } from '../../../../utils/email-validator';
13
- import Dialog from '@material-ui/core/Dialog';
14
- import CircularProgress from '@material-ui/core/CircularProgress';
15
- import styled from 'styled-components';
16
- import SnackBar from '../../../atoms/Snackbar/index';
17
- import { phoneValidation } from '../../../../utils/phone-validator';
18
- import ls from 'localstorage-slim';
19
- import FullPictureForm from '../../../../../src/components/toolbar/popup/savedesign/FullPictureForm';
20
-
21
- const StyledDialog = styled(Dialog)`
22
- .MuiDialog-paperWidthSm {
23
- border-radius: 10px;
24
- width: 480px;
25
- padding: 32px;
26
- }
27
- `;
28
-
29
- class SaveDesignPopup extends React.Component {
30
- constructor(props) {
31
- super(props);
32
- let customerInfo = {};
33
- try {
34
- customerInfo = ls.get(LOCAL_STORAGE_CUSTOMER_INFO);
35
- } catch (e) {
36
- customerInfo = {};
37
- }
38
-
39
- const email = props.match.params.token
40
- ? sessionStorage.getItem('email')
41
- : customerInfo?.email;
42
- const firstName = props.match.params.token
43
- ? sessionStorage.getItem('firstName')
44
- : customerInfo?.firstName;
45
- const lastName = props.match.params.token
46
- ? sessionStorage.getItem('lastName')
47
- : customerInfo?.lastName;
48
- this.state = {
49
- email: email || '',
50
- emailfocusOn: false,
51
- phone: sessionStorage.getItem('phone') || '',
52
- phonefocusOn: false,
53
- notes: '',
54
- notefocusOn: false,
55
- firstName: firstName || '',
56
- firstNamefocusOn: false,
57
- lastNamefocusOn: false,
58
- lastName: lastName || '',
59
- projectNamefocusOn: false,
60
- projectName: 'Untitled',
61
-
62
- // error handling
63
- pjNameLimit: false,
64
- isSnackBarOpen: false,
65
- snackBarMessage: '',
66
- isLoading: false,
67
- showFullForm: false
68
- };
69
-
70
- this.timeoutId = null;
71
-
72
- functionBinder.call(this);
73
-
74
- function functionBinder() {
75
- this.closePanel = this.closePanel.bind(this);
76
- this.projectNameChangeHandler = this.projectNameChangeHandler.bind(this);
77
- }
78
- }
79
-
80
- componentWillReceiveProps(newProps) {
81
- let customerInfo = {};
82
- try {
83
- customerInfo = ls.get(LOCAL_STORAGE_CUSTOMER_INFO);
84
- } catch (e) {
85
- customerInfo = {};
86
- }
87
-
88
- const email = customerInfo?.email || sessionStorage.getItem('email');
89
- const phone = sessionStorage.getItem('phone');
90
- const firstName =
91
- customerInfo?.firstName || sessionStorage.getItem('firstName');
92
- const lastName =
93
- customerInfo?.lastName || sessionStorage.getItem('lastName');
94
- let projectName = sessionStorage.getItem('projectTitle');
95
- if (newProps.state.scene.title !== '') {
96
- projectName =
97
- newProps.state.scene.title || sessionStorage.getItem('projectTitle');
98
- }
99
-
100
- if (newProps.visible !== this.props.visible && newProps.visible) {
101
- if (email !== null && email !== 'temp_xxx@yyy.com') {
102
- this.setState({ email: email });
103
- }
104
- if (phone !== null) {
105
- this.setState({ phone: phone });
106
- }
107
- if (firstName !== null) {
108
- this.setState({ firstName: firstName });
109
- }
110
- if (lastName !== null) {
111
- this.setState({ lastName: lastName });
112
- }
113
- if (projectName !== null) {
114
- this.setState({ projectName });
115
- }
116
- }
117
- }
118
-
119
- closePanel() {
120
- this.props.handleSaveDesign(false);
121
- setTimeout(() => {
122
- this.setState({
123
- firstName: '',
124
- lastName: '',
125
- email: '',
126
- projectName: '',
127
- notes: '',
128
- phone: '',
129
- showFullForm: false
130
- });
131
- }, 500);
132
- }
133
-
134
- projectNameChangeHandler(e) {
135
- if (e.target.value.length >= PROJECT_NAME_LENGTH_LIMIT) {
136
- this.setState({ pjNameLimit: true });
137
- clearTimeout(this.timeoutId);
138
- this.timeoutId = setTimeout(
139
- () => this.setState({ pjNameLimit: false }),
140
- 2000
141
- );
142
- } else {
143
- this.setState({ projectName: e.target.value });
144
- }
145
- }
146
-
147
- submitFinalData = async payload => {
148
- this.setState({ isLoading: true });
149
- const result = await this.props.saveProject(payload);
150
- if (result?.success) {
151
- this.closePanel(); // Reset state, close modal
152
- }
153
- this.setState({ isLoading: false });
154
- };
155
-
156
- render() {
157
- let { visible } = this.props;
158
- let {
159
- email,
160
- emailfocusOn,
161
- phone,
162
- phonefocusOn,
163
- notes,
164
- firstName,
165
- firstNamefocusOn,
166
- lastName,
167
- lastNamefocusOn,
168
- projectName,
169
- projectNamefocusOn,
170
- notefocusOn,
171
- isLoading
172
- } = this.state;
173
-
174
- const initialFullFormValues = {
175
- userType: sessionStorage.getItem('user_type') || '',
176
- designType: sessionStorage.getItem('project_type') || '',
177
- startTime: sessionStorage.getItem('project_timeline') || ''
178
- };
179
-
180
- const visualizerName = sessionStorage.getItem('visualizerName');
181
-
182
- if (this.state.showFullForm) {
183
- return (
184
- <StyledDialog
185
- open={visible}
186
- onClose={!isLoading ? this.closePanel.bind(this) : undefined}
187
- >
188
- <SnackBar
189
- isOpen={this.state.isSnackBarOpen}
190
- message={this.state.snackBarMessage}
191
- handleClose={() =>
192
- this.setState({ isSnackBarOpen: false, snackBarMessage: '' })
193
- }
194
- />
195
- <S.DialogTitle>Give Us the Full Picture</S.DialogTitle>
196
- <S.DialogContent>
197
- <div>
198
- <b>Thanks for saving your project!</b>
199
- </div>
200
- <br />
201
- <div>
202
- Sharing a few details helps us guide you based on your goals and
203
- experience.
204
- </div>
205
- </S.DialogContent>
206
- <S.DialogContentSelection>
207
- <FullPictureForm
208
- isLoading={isLoading}
209
- initialValues={initialFullFormValues}
210
- onComplete={extraFormData => {
211
- sessionStorage.setItem('user_type', extraFormData.userType);
212
- sessionStorage.setItem(
213
- 'project_type',
214
- extraFormData.designType
215
- );
216
- sessionStorage.setItem(
217
- 'project_timeline',
218
- extraFormData.startTime
219
- );
220
-
221
- const payload = {
222
- ...this.state,
223
- user_type: extraFormData.userType,
224
- project_type: extraFormData.designType,
225
- project_timeline: extraFormData.startTime,
226
- ...extraFormData
227
- };
228
- this.submitFinalData(payload);
229
- }}
230
- onSkip={extraFormData => {
231
- const payload = {
232
- ...this.state,
233
- user_type: extraFormData.userType,
234
- project_type: extraFormData.designType,
235
- project_timeline: extraFormData.startTime,
236
- ...extraFormData
237
- };
238
- this.submitFinalData(payload);
239
- }}
240
- />
241
- </S.DialogContentSelection>
242
- </StyledDialog>
243
- );
244
- }
245
-
246
- return (
247
- <StyledDialog
248
- open={visible}
249
- onClose={!isLoading ? this.closePanel.bind(this) : undefined}
250
- >
251
- <SnackBar
252
- isOpen={this.state.isSnackBarOpen}
253
- message={this.state.snackBarMessage}
254
- handleClose={() =>
255
- this.setState({ isSnackBarOpen: false, snackBarMessage: '' })
256
- }
257
- />
258
- <S.DialogTitle>Save your project</S.DialogTitle>
259
- <S.DialogContent>
260
- Save your project in order to request Designer Assistance and/or Add
261
- to Cart, and to be able to access it later via the email link.
262
- </S.DialogContent>
263
- <S.DialogContentSelection>
264
- <div
265
- style={{
266
- display: 'flex',
267
- alignItems: 'center',
268
- gap: '1rem'
269
- }}
270
- >
271
- <S.StyledInputWrapper>
272
- <S.StyledInput
273
- id="first_name_input"
274
- value={firstName}
275
- onChange={e => this.setState({ firstName: e.target.value })}
276
- onFocus={e => this.setState({ firstNamefocusOn: true })}
277
- onBlur={e => this.setState({ firstNamefocusOn: false })}
278
- placeholder={
279
- firstNamefocusOn ? 'Enter first name' : 'First name'
280
- }
281
- required
282
- ></S.StyledInput>
283
- {(firstNamefocusOn || !!firstName.length) && (
284
- <S.StyledInputHeadLabel
285
- style={{ color: !firstNamefocusOn && TEXT_COLOR_NEUTRAL_2 }}
286
- >
287
- First Name
288
- </S.StyledInputHeadLabel>
289
- )}
290
- {!!firstName.length && (
291
- <S.PlusImage
292
- maskImage="/assets/img/svg/bottombar/arrow-plus.svg"
293
- onClick={() => this.setState({ firstName: '' })}
294
- />
295
- )}
296
- </S.StyledInputWrapper>
297
- <S.StyledInputWrapper>
298
- <S.StyledInput
299
- value={lastName}
300
- onChange={e => this.setState({ lastName: e.target.value })}
301
- onFocus={e => this.setState({ lastNamefocusOn: true })}
302
- onBlur={e => this.setState({ lastNamefocusOn: false })}
303
- placeholder={lastNamefocusOn ? 'Enter last name' : 'Last name'}
304
- required
305
- />
306
- {(lastNamefocusOn || !!lastName.length) && (
307
- <S.StyledInputHeadLabel
308
- style={{ color: !lastNamefocusOn && TEXT_COLOR_NEUTRAL_2 }}
309
- >
310
- Last Name
311
- </S.StyledInputHeadLabel>
312
- )}
313
- {!!lastName.length && (
314
- <S.PlusImage
315
- maskImage="/assets/img/svg/bottombar/arrow-plus.svg"
316
- onClick={() => this.setState({ lastName: '' })}
317
- />
318
- )}
319
- </S.StyledInputWrapper>
320
- </div>
321
- <S.StyledInputWrapper>
322
- <S.StyledInput
323
- value={email}
324
- onChange={e => this.setState({ email: e.target.value })}
325
- onFocus={e => this.setState({ emailfocusOn: true })}
326
- onBlur={e => this.setState({ emailfocusOn: false })}
327
- placeholder={
328
- emailfocusOn ? 'Enter email address' : 'Email Address'
329
- }
330
- required
331
- />
332
- {(emailfocusOn || !!email.length) && (
333
- <S.StyledInputHeadLabel
334
- style={{ color: !emailfocusOn && TEXT_COLOR_NEUTRAL_2 }}
335
- >
336
- Email Address
337
- </S.StyledInputHeadLabel>
338
- )}
339
- {!!email.length && (
340
- <S.PlusImage
341
- maskImage="/assets/img/svg/bottombar/arrow-plus.svg"
342
- onClick={() => this.setState({ email: '' })}
343
- />
344
- )}
345
- </S.StyledInputWrapper>
346
- <S.StyledInputWrapper>
347
- <S.StyledInput
348
- value={phone}
349
- onChange={e => {
350
- this.setState({ phone: e.target.value });
351
- }}
352
- onFocus={e => this.setState({ phonefocusOn: true })}
353
- onBlur={e => this.setState({ phonefocusOn: false })}
354
- maxLength={50}
355
- placeholder={phonefocusOn ? 'Enter phone number' : 'Phone Number'}
356
- required
357
- />
358
- {(phonefocusOn || !!phone.length) && (
359
- <S.StyledInputHeadLabel
360
- style={{ color: !phonefocusOn && TEXT_COLOR_NEUTRAL_2 }}
361
- >
362
- Phone Number
363
- </S.StyledInputHeadLabel>
364
- )}
365
- {!!phone.length && (
366
- <S.PlusImage
367
- maskImage="/assets/img/svg/bottombar/arrow-plus.svg"
368
- onClick={() => this.setState({ phone: '' })}
369
- />
370
- )}
371
- </S.StyledInputWrapper>
372
- <S.StyledInputWrapper>
373
- <S.StyledInput
374
- style={{ fontWeight: 700, color: TEXT_COLOR_NEUTRAL_0 }}
375
- value={projectName}
376
- onChange={e => this.setState({ projectName: e.target.value })}
377
- onFocus={e => this.setState({ projectNamefocusOn: true })}
378
- onBlur={e => this.setState({ projectNamefocusOn: false })}
379
- placeholder={
380
- projectNamefocusOn ? 'Enter project name' : 'Project Name'
381
- }
382
- required
383
- />
384
- {(projectNamefocusOn || !!projectName.length) && (
385
- <S.StyledInputHeadLabel
386
- style={{ color: !projectNamefocusOn && TEXT_COLOR_NEUTRAL_2 }}
387
- >
388
- Project Name
389
- </S.StyledInputHeadLabel>
390
- )}
391
- {!!projectName.length && (
392
- <S.PlusImage
393
- maskImage="/assets/img/svg/bottombar/arrow-plus.svg"
394
- onClick={() => this.setState({ projectName: '' })}
395
- />
396
- )}
397
- </S.StyledInputWrapper>
398
- <div style={{ width: '100%', marginTop: 10, display: 'none' }}>
399
- <S.StyledInputWrapper>
400
- <S.DialogTextArea
401
- value={notes}
402
- maxLength={200}
403
- onFocus={e => this.setState({ notefocusOn: true })}
404
- onBlur={e => this.setState({ notefocusOn: false })}
405
- placeholder={notefocusOn ? 'Input' : 'Notes (optional)'}
406
- onChange={e => this.setState({ notes: e.target.value })}
407
- />
408
- {(notefocusOn || !!notes.length) && (
409
- <S.StyledInputHeadLabel
410
- style={{
411
- color: !notefocusOn && TEXT_COLOR_NEUTRAL_2,
412
- left: 7
413
- }}
414
- >
415
- Notes (optional)
416
- </S.StyledInputHeadLabel>
417
- )}
418
- </S.StyledInputWrapper>
419
- <span
420
- style={{
421
- fontFamily: DEFAULT_FONT_FAMILY,
422
- fontSize: 13,
423
- color: TEXT_COLOR_NEUTRAL_1,
424
- float: 'right',
425
- lineHeight: '18px',
426
- fontWeight: 400
427
- }}
428
- >
429
- {notes.length}/200 characters
430
- </span>
431
- </div>
432
- <span
433
- style={{
434
- fontFamily: DEFAULT_FONT_FAMILY,
435
- fontSize: 12,
436
- color: TEXT_COLOR_NEUTRAL_1,
437
- lineHeight: '16px',
438
- marginTop: 10
439
- }}
440
- >
441
- {`By entering your email, you agree to receive marketing
442
- communications from ${CLIENTS_NAME[visualizerName]}. We respect your privacy and
443
- will never share your information with third parties. You can
444
- unsubscribe at any time.`}
445
- </span>
446
- </S.DialogContentSelection>
447
- <S.DialogAction>
448
- <S.Button onClick={() => this.closePanel()}>Cancel</S.Button>
449
- <S.Button
450
- style={{
451
- marginRight: 0
452
- }}
453
- onClick={() => {
454
- const { firstName, lastName, email, projectName, phone } =
455
- this.state;
456
- if (
457
- firstName === '' ||
458
- lastName === '' ||
459
- email === '' ||
460
- projectName === '' ||
461
- !emailValidation(email) ||
462
- phone === '' ||
463
- !phoneValidation(phone) ||
464
- projectName.trim() === '' ||
465
- firstName.trim() === '' ||
466
- lastName.trim() === ''
467
- ) {
468
- let msg;
469
- if (firstName === '' || firstName.trim() === '')
470
- msg = 'Type your first name';
471
- else if (lastName === '' || lastName.trim() === '')
472
- msg = 'Type your last name';
473
- else if (email === '') msg = 'Type your email address';
474
- else if (phone === '') msg = 'Type your phone number';
475
- else if (projectName === '' || projectName.trim() === '')
476
- msg = 'Type your project name';
477
- else if (!emailValidation(email))
478
- msg = 'Type your valid email address';
479
- else if (!phoneValidation(phone)) msg = 'Type your valid phone';
480
- this.setState({ isSnackBarOpen: true, snackBarMessage: msg });
481
- return;
482
- }
483
-
484
- this.setState({ showFullForm: true });
485
- }}
486
- >
487
- {isLoading ? <CircularProgress size={20} /> : 'Save'}
488
- </S.Button>
489
- </S.DialogAction>
490
- </StyledDialog>
491
- );
492
- }
493
- }
494
-
495
- export default SaveDesignPopup;
@@ -1,16 +0,0 @@
1
- .savedesign-row {
2
- position: relative;
3
- padding-top: 20px;
4
- width: 360px;
5
- }
6
-
7
- .savedesign-warning {
8
- word-break: keep-all;
9
- margin-top: 3px;
10
- color: #ff7373;
11
- font-size: 11px;
12
- padding-right: 3px;
13
- position: absolute;
14
- right: 0px;
15
- top: 40px;
16
- }