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.
- package/package.json +23 -3
- package/src/components/_export.js +11 -0
- package/src/components/viewer3d/scene-creator.js +23 -26
- package/src/components/viewer3d/viewer3d.js +18 -18
- package/src/components/catalog-view/catalog-breadcrumb.jsx +0 -53
- package/src/components/catalog-view/catalog-item.jsx +0 -229
- package/src/components/catalog-view/catalog-list.jsx +0 -173
- package/src/components/catalog-view/catalog-page-item.jsx +0 -110
- package/src/components/catalog-view/catalog-turn-back-page-item.jsx +0 -80
- package/src/components/configurator/custom-configurator.jsx +0 -77
- package/src/components/configurator/project-configurator.jsx +0 -120
- package/src/components/export.js +0 -36
- package/src/components/firstsetting/button/styles.js +0 -223
- package/src/components/firstsetting/export.js +0 -9
- package/src/components/firstsetting/firstsetting-content-button.jsx +0 -198
- package/src/components/firstsetting/firstsetting-toggle-button.jsx +0 -101
- package/src/components/firstsetting/firstsetting.jsx +0 -814
- package/src/components/footerbar/button/ControlButton.jsx +0 -43
- package/src/components/footerbar/button/DirectionButton.jsx +0 -54
- package/src/components/footerbar/button/DirectionPanSpinButton.jsx +0 -36
- package/src/components/footerbar/button/ToggleButton.jsx +0 -58
- package/src/components/footerbar/button/ToggleConvertButton.jsx +0 -48
- package/src/components/footerbar/button/ToggleMeasureButton.jsx +0 -33
- package/src/components/footerbar/button/styles.js +0 -217
- package/src/components/footerbar/export.js +0 -9
- package/src/components/footerbar/footer-content-button.jsx +0 -198
- package/src/components/footerbar/footer-toggle-button.jsx +0 -101
- package/src/components/footerbar/footerbar.jsx +0 -1103
- package/src/components/footerbar/styles.js +0 -263
- package/src/components/header/button/MenuButton.jsx +0 -46
- package/src/components/header/button/SaveButton.jsx +0 -54
- package/src/components/header/button/styles.js +0 -181
- package/src/components/header/export.js +0 -5
- package/src/components/header/header.jsx +0 -631
- package/src/components/header/header.style.css +0 -47
- package/src/components/header/styles.js +0 -320
- package/src/components/login/Login.js +0 -77
- package/src/components/login/LoginForm/index.js +0 -108
- package/src/components/login/Register.js +0 -83
- package/src/components/login/RegisterForm/index.js +0 -171
- package/src/components/login/jwtService.js +0 -201
- package/src/components/login/style.css +0 -158
- package/src/components/login/style.scss +0 -260
- package/src/components/myprojects/export.js +0 -5
- package/src/components/myprojects/index.jsx +0 -445
- package/src/components/myprojects/styles.js +0 -241
- package/src/components/sidebar/custom-accordion.jsx +0 -48
- package/src/components/sidebar/export.js +0 -15
- package/src/components/sidebar/panel-element-editor/attributes-editor/attributes-editor.jsx +0 -73
- package/src/components/sidebar/panel-element-editor/attributes-editor/confirm-popup.jsx +0 -101
- package/src/components/sidebar/panel-element-editor/attributes-editor/hole-attributes-editor.jsx +0 -149
- package/src/components/sidebar/panel-element-editor/attributes-editor/item-attributes-editor.jsx +0 -316
- package/src/components/sidebar/panel-element-editor/attributes-editor/line-attributes-editor.jsx +0 -108
- package/src/components/sidebar/panel-element-editor/element-editor.jsx +0 -1070
- package/src/components/sidebar/panel-element-editor/multi-elements-editor.jsx +0 -0
- package/src/components/sidebar/panel-element-editor/panel-element-editor.jsx +0 -104
- package/src/components/sidebar/panel-element-editor/panel-multi-elements-editor.jsx +0 -155
- package/src/components/sidebar/panel-group-editor.jsx +0 -272
- package/src/components/sidebar/panel-groups.jsx +0 -310
- package/src/components/sidebar/panel-guides.jsx +0 -192
- package/src/components/sidebar/panel-layer-elements.jsx +0 -298
- package/src/components/sidebar/panel-layers.jsx +0 -381
- package/src/components/sidebar/panel.jsx +0 -71
- package/src/components/sidebar/sidebar.jsx +0 -106
- package/src/components/sidebar/toolbar-panel.jsx +0 -139
- package/src/components/sign/export.js +0 -7
- package/src/components/sign/main/index.jsx +0 -523
- package/src/components/sign/main/styles.js +0 -163
- package/src/components/toolbar/button/ControlButton.jsx +0 -41
- package/src/components/toolbar/button/DirectionButton.jsx +0 -34
- package/src/components/toolbar/button/RightButton.jsx +0 -103
- package/src/components/toolbar/button/ToggleButton.jsx +0 -41
- package/src/components/toolbar/button/index.jsx +0 -55
- package/src/components/toolbar/button/styles.js +0 -127
- package/src/components/toolbar/components/DoorStyleMenu.jsx +0 -103
- package/src/components/toolbar/components/Pricing.jsx +0 -126
- package/src/components/toolbar/components/ReviewForQuote.jsx +0 -635
- package/src/components/toolbar/export.js +0 -21
- package/src/components/toolbar/main/Alert.js +0 -122
- package/src/components/toolbar/main/TakePictureModal.jsx +0 -104
- package/src/components/toolbar/main/confirm-popup.jsx +0 -99
- package/src/components/toolbar/main/index.jsx +0 -5687
- package/src/components/toolbar/main/lShaped.json +0 -311
- package/src/components/toolbar/main/longNarrow.json +0 -238
- package/src/components/toolbar/main/myComponents.js +0 -123
- package/src/components/toolbar/main/oRectangle.json +0 -220
- package/src/components/toolbar/main/rectangle.json +0 -238
- package/src/components/toolbar/main/style.css +0 -107
- package/src/components/toolbar/main/styles.js +0 -696
- package/src/components/toolbar/plugin-item.jsx +0 -123
- package/src/components/toolbar/popup/appliance/appliance-category/index.jsx +0 -73
- package/src/components/toolbar/popup/appliance/choose-appliance/index.jsx +0 -102
- package/src/components/toolbar/popup/appliance/index.jsx +0 -83
- package/src/components/toolbar/popup/autosaveprompt/index.jsx +0 -150
- package/src/components/toolbar/popup/autosaveprompt/styles.css +0 -64
- package/src/components/toolbar/popup/autosaveprompt/styles.js +0 -40
- package/src/components/toolbar/popup/cabinet/cabinet-category/index.jsx +0 -73
- package/src/components/toolbar/popup/cabinet/choose-product/index.jsx +0 -119
- package/src/components/toolbar/popup/cabinet/index.jsx +0 -85
- package/src/components/toolbar/popup/doorStyle/choose-style/index.jsx +0 -63
- package/src/components/toolbar/popup/doorStyle/index.jsx +0 -71
- package/src/components/toolbar/popup/doorStyle/style-category/index.jsx +0 -139
- package/src/components/toolbar/popup/downloadsummary/downloadSummaryContext.js +0 -2
- package/src/components/toolbar/popup/downloadsummary/downloadSummaryTemp.jsx +0 -157
- package/src/components/toolbar/popup/downloadsummary/index.jsx +0 -643
- package/src/components/toolbar/popup/downloadsummary/show2D/show2DView.jsx +0 -51
- package/src/components/toolbar/popup/downloadsummary/show2D/viewer2DDownLoad.jsx +0 -175
- package/src/components/toolbar/popup/downloadsummary/show3D/show3DView.jsx +0 -283
- package/src/components/toolbar/popup/downloadsummary/show3D/viewer3DDownLoad.jsx +0 -2257
- package/src/components/toolbar/popup/downloadsummary/showCabinetInfo.js +0 -93
- package/src/components/toolbar/popup/downloadsummary/showElevation/showElevationView.jsx +0 -132
- package/src/components/toolbar/popup/downloadsummary/showElevation/viewer3DElevationDownload.jsx +0 -2198
- package/src/components/toolbar/popup/downloadsummary/showElevation/viewerElevationDownload.jsx +0 -152
- package/src/components/toolbar/popup/downloadsummary/showWarranty.jsx +0 -149
- package/src/components/toolbar/popup/downloadsummary/styles.css +0 -177
- package/src/components/toolbar/popup/downloadsummary/styles.js +0 -453
- package/src/components/toolbar/popup/finishingtouch/category/index.jsx +0 -34
- package/src/components/toolbar/popup/finishingtouch/index.jsx +0 -58
- package/src/components/toolbar/popup/finishingtouch/material-edit.jsx +0 -112
- package/src/components/toolbar/popup/finishingtouch/product/index.jsx +0 -116
- package/src/components/toolbar/popup/floorplan/choose-floor/confirm-popup.jsx +0 -101
- package/src/components/toolbar/popup/floorplan/choose-floor/index.jsx +0 -254
- package/src/components/toolbar/popup/floorplan/choose-floor/lShaped.json +0 -311
- package/src/components/toolbar/popup/floorplan/choose-floor/longNarrow.json +0 -238
- package/src/components/toolbar/popup/floorplan/choose-floor/oRectangle.json +0 -220
- package/src/components/toolbar/popup/floorplan/choose-floor/rectangle.json +0 -238
- package/src/components/toolbar/popup/floorplan/choose-floor/styles.js +0 -86
- package/src/components/toolbar/popup/floorplan/floor-category/index.jsx +0 -109
- package/src/components/toolbar/popup/floorplan/index.jsx +0 -60
- package/src/components/toolbar/popup/index.jsx +0 -241
- package/src/components/toolbar/popup/newproject/index.jsx +0 -59
- package/src/components/toolbar/popup/newproject/styles.css +0 -64
- package/src/components/toolbar/popup/newproject/styles.js +0 -41
- package/src/components/toolbar/popup/product/appliance.jsx +0 -54
- package/src/components/toolbar/popup/product/cabinetproduct.jsx +0 -15
- package/src/components/toolbar/popup/product/doorstyle.jsx +0 -58
- package/src/components/toolbar/popup/product/doorstyleproduct.jsx +0 -47
- package/src/components/toolbar/popup/product/floor.jsx +0 -36
- package/src/components/toolbar/popup/product/floorproduct.jsx +0 -42
- package/src/components/toolbar/popup/product/index.jsx +0 -36
- package/src/components/toolbar/popup/product/primary.jsx +0 -77
- package/src/components/toolbar/popup/product/productline.jsx +0 -93
- package/src/components/toolbar/popup/product/reviewItem.jsx +0 -427
- package/src/components/toolbar/popup/product/reviewMolding.jsx +0 -310
- package/src/components/toolbar/popup/product/style.css +0 -54
- package/src/components/toolbar/popup/product/styles.js +0 -260
- package/src/components/toolbar/popup/savedesign/FullPictureForm.jsx +0 -146
- package/src/components/toolbar/popup/savedesign/index.jsx +0 -495
- package/src/components/toolbar/popup/savedesign/savedesign.style.css +0 -16
- package/src/components/toolbar/popup/savedesign/styles.js +0 -151
- package/src/components/toolbar/popup/setDoorStyleOption/index.jsx +0 -87
- package/src/components/toolbar/popup/styles.js +0 -909
- package/src/components/toolbar/popup/submitforquote/AddToCartOptions.jsx +0 -192
- package/src/components/toolbar/popup/submitforquote/CustomerRequestsForm.jsx +0 -96
- package/src/components/toolbar/popup/submitforquote/SkipDesignerReview.jsx +0 -54
- package/src/components/toolbar/popup/submitforquote/StepDots.jsx +0 -25
- package/src/components/toolbar/popup/submitforquote/cart-choice.jsx +0 -116
- package/src/components/toolbar/popup/submitforquote/doorstyle-menus.js +0 -38
- package/src/components/toolbar/popup/submitforquote/index.jsx +0 -698
- package/src/components/toolbar/popup/submitforquote/styles.css +0 -105
- package/src/components/toolbar/popup/submitforquote/styles.js +0 -294
- package/src/components/toolbar/popup/submitprompt/index.jsx +0 -89
- package/src/components/toolbar/popup/submitprompt/styles.css +0 -64
- package/src/components/toolbar/popup/submitprompt/styles.js +0 -42
- package/src/components/toolbar/toolbar-button.jsx +0 -90
- package/src/components/toolbar/toolbar-load-button.jsx +0 -36
- package/src/components/toolbar/toolbar-save-button.jsx +0 -32
- package/src/components/wizardstep/button/styles.js +0 -677
- package/src/components/wizardstep/export.js +0 -5
- package/src/components/wizardstep/index.jsx +0 -1372
- package/src/components/wizardstep/styles.js +0 -688
- package/src/components/wizardstep/wizardstep-content-button.jsx +0 -198
- package/src/components/wizardstep/wizardstep-toggle-button.jsx +0 -101
- package/src/hooks/useCheckCart.js +0 -38
- package/src/hooks/useGetPricesBySku.js +0 -59
- package/src/hooks/useValidateToken.js +0 -181
- package/src/styles/export.js +0 -7
- package/src/styles/tabs.css +0 -40
|
@@ -1,631 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { Component } from 'react';
|
|
4
|
-
import * as Icon from 'react-icons/fa';
|
|
5
|
-
import Popup from 'reactjs-popup';
|
|
6
|
-
import {
|
|
7
|
-
KEYBOARD_BUTTON_CODE,
|
|
8
|
-
MODE,
|
|
9
|
-
NEW_DESIGN,
|
|
10
|
-
SAVE_DESIGN,
|
|
11
|
-
ASK_QUOTE,
|
|
12
|
-
DEFAULT_FONT_FAMILY,
|
|
13
|
-
TEXT_COLOR_NEUTRAL_0,
|
|
14
|
-
TEXT_COLOR_NEUTRAL_3,
|
|
15
|
-
SUBMIT_DESIGN,
|
|
16
|
-
BG_COLOR_1,
|
|
17
|
-
SUBMIT_REQUEST_ASSIST,
|
|
18
|
-
SUBMIT_ADD_CART
|
|
19
|
-
} from '../../constants';
|
|
20
|
-
import { FormTextInput } from '../style/export';
|
|
21
|
-
import './header.style.css';
|
|
22
|
-
import * as PS from './styles';
|
|
23
|
-
import SnackBar from '../atoms/Snackbar/index';
|
|
24
|
-
import { SaveButton } from '../../../src/components/header/button/SaveButton';
|
|
25
|
-
import { Button } from '@material-ui/core';
|
|
26
|
-
import InfoIcon from '@material-ui/icons/Info';
|
|
27
|
-
import Tooltip from '@material-ui/core/Tooltip';
|
|
28
|
-
|
|
29
|
-
const AWS = require('aws-sdk');
|
|
30
|
-
|
|
31
|
-
const s3 = new AWS.S3({
|
|
32
|
-
accessKeyId: process.env.REACT_APP_AWS_ID,
|
|
33
|
-
secretAccessKey: process.env.REACT_APP_AWS_SECRET
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
const headerBarStyle = {
|
|
37
|
-
position: 'absolute',
|
|
38
|
-
top: 0,
|
|
39
|
-
// fontSize: '12px',
|
|
40
|
-
borderBottom: '1px solid #e8e8e8',
|
|
41
|
-
display: 'flex',
|
|
42
|
-
// backgroundColor: SharedStyle.SECONDARY_COLOR.alt,
|
|
43
|
-
boxShadow:
|
|
44
|
-
'3px 1px 3px 0px rgba(0,0,0,0.2), -1px -1px 1px 0px rgba(0,0,0,0.14), 0px 2px 1px -1px rgba(0,0,0,0.12)',
|
|
45
|
-
backgroundColor: '#fff',
|
|
46
|
-
padding: '3px 1em',
|
|
47
|
-
textAlign: 'center',
|
|
48
|
-
border: 0,
|
|
49
|
-
margin: 0,
|
|
50
|
-
boxSizing: 'border-box',
|
|
51
|
-
cursor: 'default',
|
|
52
|
-
userSelect: 'none',
|
|
53
|
-
zIndex: '199'
|
|
54
|
-
};
|
|
55
|
-
const inputStyle = { textAlign: 'left', height: '32px', border: 'unset' };
|
|
56
|
-
const uploadFiles = (data, filePath) => {
|
|
57
|
-
var p1 = new Promise((resolve, reject) => {
|
|
58
|
-
const params = {
|
|
59
|
-
Bucket: process.env.REACT_APP_AWS_BUCKET_NAME,
|
|
60
|
-
Key: filePath,
|
|
61
|
-
Body: data,
|
|
62
|
-
ContentType: 'application/json',
|
|
63
|
-
ACL: 'public-read'
|
|
64
|
-
};
|
|
65
|
-
s3.putObject(params, function (err, data) {
|
|
66
|
-
if (err) {
|
|
67
|
-
reject(err);
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
console.log('success');
|
|
71
|
-
resolve([data.Location]);
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
return p1;
|
|
75
|
-
};
|
|
76
|
-
export default class Header extends Component {
|
|
77
|
-
constructor(props, context) {
|
|
78
|
-
super(props, context);
|
|
79
|
-
this.state = {
|
|
80
|
-
HamburgerMenuOpen: false,
|
|
81
|
-
renameForm: false,
|
|
82
|
-
renameTitle: ' ',
|
|
83
|
-
saveAsBtnClicked: false,
|
|
84
|
-
isSnackBarOpen: false,
|
|
85
|
-
snackBarMessage: '',
|
|
86
|
-
isLoading: false
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
canSubmit() {
|
|
91
|
-
return this.state.renameTitle !== '';
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
renameFormToggle(data, saveAsBtnClicked = false) {
|
|
95
|
-
if (this.canSubmit()) {
|
|
96
|
-
this.setState({
|
|
97
|
-
renameForm: data,
|
|
98
|
-
saveAsBtnClicked
|
|
99
|
-
});
|
|
100
|
-
} else {
|
|
101
|
-
this.setState({
|
|
102
|
-
isSnackBarOpen: true,
|
|
103
|
-
snackBarMessage: 'This field is required'
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
onRenameTitleChange(ev) {
|
|
109
|
-
this.setState({ renameTitle: ev.target.value });
|
|
110
|
-
sessionStorage.setItem('projectTitle', ev.target.value);
|
|
111
|
-
this.context.projectActions.rename(ev.target.value);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
renameTitleSubmit(ev) {
|
|
115
|
-
ev.preventDefault();
|
|
116
|
-
if (!this.canSubmit()) {
|
|
117
|
-
this.renameFormToggle(false);
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
this.setState({
|
|
121
|
-
renameForm: false,
|
|
122
|
-
renameTitle: this.state.renameTitle
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
handlePopupClose(e) {
|
|
126
|
-
const { HamburgerMenuOpen } = this.state;
|
|
127
|
-
this.setState({ HamburgerMenuOpen: !HamburgerMenuOpen });
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
render() {
|
|
131
|
-
let {
|
|
132
|
-
props: {
|
|
133
|
-
state,
|
|
134
|
-
width,
|
|
135
|
-
height,
|
|
136
|
-
saveProject: _saveProject,
|
|
137
|
-
newProject,
|
|
138
|
-
handleSaveDesign,
|
|
139
|
-
handleSubmitForQuote,
|
|
140
|
-
handleNewProject,
|
|
141
|
-
isModalVisible,
|
|
142
|
-
handleSubmitPrompt
|
|
143
|
-
},
|
|
144
|
-
context: { projectActions, userActions, translator }
|
|
145
|
-
} = this;
|
|
146
|
-
|
|
147
|
-
const {
|
|
148
|
-
HamburgerMenuOpen,
|
|
149
|
-
renameTitle,
|
|
150
|
-
renameForm,
|
|
151
|
-
saveAsBtnClicked,
|
|
152
|
-
isLoading
|
|
153
|
-
} = this.state;
|
|
154
|
-
let userInfo = [];
|
|
155
|
-
if (this.props.match) userInfo = this.props.match.params;
|
|
156
|
-
// let projectTitle = sessionStorage.getItem('projectTitle');
|
|
157
|
-
let projectTitle = state.scene.title;
|
|
158
|
-
let projectId = sessionStorage.getItem('projectId');
|
|
159
|
-
|
|
160
|
-
if (projectTitle == null || projectTitle == '') {
|
|
161
|
-
sessionStorage.setItem('projectTitle', 'Untitled');
|
|
162
|
-
this.context.projectActions.rename('Untitled');
|
|
163
|
-
projectTitle = 'Untitled';
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
let handleSaveBtn = async ({ showPrompt = true }) => {
|
|
167
|
-
if (showPrompt) {
|
|
168
|
-
handleSaveDesign(true);
|
|
169
|
-
} else {
|
|
170
|
-
this.setState({ isLoading: true });
|
|
171
|
-
|
|
172
|
-
const extraFormData = {
|
|
173
|
-
userType: sessionStorage.getItem('user_type') || '',
|
|
174
|
-
designType: sessionStorage.getItem('project_type') || '',
|
|
175
|
-
startTime: sessionStorage.getItem('project_timeline') || ''
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
// It's a saved project, Save the changed project
|
|
179
|
-
await this.props.saveProject({
|
|
180
|
-
projectName: state.scene.title,
|
|
181
|
-
projectId: sessionStorage.getItem('projectId'),
|
|
182
|
-
email: sessionStorage.getItem('email'),
|
|
183
|
-
firstName: sessionStorage.getItem('firstName'),
|
|
184
|
-
lastName: sessionStorage.getItem('lastName'),
|
|
185
|
-
phone: sessionStorage.getItem('phone'),
|
|
186
|
-
user_type: extraFormData.userType,
|
|
187
|
-
project_type: extraFormData.designType,
|
|
188
|
-
project_timeline: extraFormData.startTime
|
|
189
|
-
});
|
|
190
|
-
this.setState({ isLoading: false });
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
let newProjectBtn = () => {
|
|
195
|
-
if (sessionStorage.getItem('asking')) newProject();
|
|
196
|
-
else handleNewProject(true);
|
|
197
|
-
this.props.setToolbar('');
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
let saveProject = e => {
|
|
201
|
-
e.preventDefault();
|
|
202
|
-
this.setState({ HamburgerMenuOpen: !HamburgerMenuOpen });
|
|
203
|
-
_saveProject();
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
let saveAsBtnClickEvent = e => {
|
|
207
|
-
e.preventDefault();
|
|
208
|
-
this.setState({ HamburgerMenuOpen: !HamburgerMenuOpen });
|
|
209
|
-
projectActions.unselectAll();
|
|
210
|
-
this.renameFormToggle(true, true);
|
|
211
|
-
};
|
|
212
|
-
|
|
213
|
-
let snaplibrary = e => {
|
|
214
|
-
e.preventDefault();
|
|
215
|
-
projectActions.openCatalog();
|
|
216
|
-
this.setState({ HamburgerMenuOpen: !HamburgerMenuOpen });
|
|
217
|
-
};
|
|
218
|
-
|
|
219
|
-
let objectProperty = '';
|
|
220
|
-
|
|
221
|
-
if (HamburgerMenuOpen) {
|
|
222
|
-
objectProperty = (
|
|
223
|
-
<PS.SelectedWrapper>
|
|
224
|
-
<PS.TitleBar>
|
|
225
|
-
<PS.TitleBarIconButton
|
|
226
|
-
onClick={e => {
|
|
227
|
-
this.setState({ HamburgerMenuOpen: !HamburgerMenuOpen });
|
|
228
|
-
}}
|
|
229
|
-
>
|
|
230
|
-
<Icon.FaTimes />
|
|
231
|
-
</PS.TitleBarIconButton>
|
|
232
|
-
</PS.TitleBar>
|
|
233
|
-
<PS.ContentWrapper>
|
|
234
|
-
<PS.SubTitle
|
|
235
|
-
onClick={e => {
|
|
236
|
-
this.props.history.push('/login');
|
|
237
|
-
userInfo.role !== undefined && userActions.logout();
|
|
238
|
-
}}
|
|
239
|
-
>
|
|
240
|
-
{userInfo.role === undefined ? 'Sign in' : 'Sign out'}
|
|
241
|
-
</PS.SubTitle>
|
|
242
|
-
<PS.SubTitle
|
|
243
|
-
onClick={e => {
|
|
244
|
-
this.props.history.push({
|
|
245
|
-
pathname: '/register',
|
|
246
|
-
state: { type: 'register' }
|
|
247
|
-
});
|
|
248
|
-
}}
|
|
249
|
-
>
|
|
250
|
-
{'Register'}
|
|
251
|
-
</PS.SubTitle>
|
|
252
|
-
{userInfo.role === 'admin' ||
|
|
253
|
-
(userInfo.role === 'superadmin' && (
|
|
254
|
-
<PS.SubTitle
|
|
255
|
-
onClick={e => {
|
|
256
|
-
this.props.history.push({
|
|
257
|
-
pathname: '/register',
|
|
258
|
-
state: { type: 'adduser' }
|
|
259
|
-
});
|
|
260
|
-
}}
|
|
261
|
-
>
|
|
262
|
-
Add user
|
|
263
|
-
</PS.SubTitle>
|
|
264
|
-
))}
|
|
265
|
-
<PS.Diver></PS.Diver>
|
|
266
|
-
<PS.SubTitle
|
|
267
|
-
onClick={event => {
|
|
268
|
-
this.setState({ HamburgerMenuOpen: !HamburgerMenuOpen });
|
|
269
|
-
confirm('Would you want to start a new Project?')
|
|
270
|
-
? (projectActions.newProject(),
|
|
271
|
-
this.renameFormToggle(false),
|
|
272
|
-
sessionStorage.removeItem('projectId'),
|
|
273
|
-
sessionStorage.setItem('projectTitle', 'Untitled'),
|
|
274
|
-
projectActions.rename('Untitled'))
|
|
275
|
-
: null;
|
|
276
|
-
}}
|
|
277
|
-
>
|
|
278
|
-
New Project
|
|
279
|
-
</PS.SubTitle>
|
|
280
|
-
<PS.Diver></PS.Diver>
|
|
281
|
-
{userInfo.role === 'designer' ||
|
|
282
|
-
userInfo.role === 'customer' ||
|
|
283
|
-
userInfo.role === 'superdesigner' ||
|
|
284
|
-
userInfo.role === 'superadmin' ? (
|
|
285
|
-
<PS.SubTitle onClick={saveProject}>Save Project</PS.SubTitle>
|
|
286
|
-
) : (
|
|
287
|
-
<PS.SubTitle
|
|
288
|
-
onClick={event => {
|
|
289
|
-
this.setState({
|
|
290
|
-
HamburgerMenuOpen: !HamburgerMenuOpen,
|
|
291
|
-
isSnackBarOpen: true,
|
|
292
|
-
snackBarMessage: 'You should Login.'
|
|
293
|
-
});
|
|
294
|
-
}}
|
|
295
|
-
>
|
|
296
|
-
Save Project
|
|
297
|
-
</PS.SubTitle>
|
|
298
|
-
)}
|
|
299
|
-
<PS.Diver></PS.Diver>
|
|
300
|
-
{userInfo.role === 'designer' ||
|
|
301
|
-
userInfo.role === 'customer' ||
|
|
302
|
-
userInfo.role === 'superdesigner' ||
|
|
303
|
-
userInfo.role === 'superadmin' ? (
|
|
304
|
-
<PS.SubTitle onClick={saveAsBtnClickEvent}>
|
|
305
|
-
Save As...
|
|
306
|
-
</PS.SubTitle>
|
|
307
|
-
) : (
|
|
308
|
-
<PS.SubTitle
|
|
309
|
-
onClick={event => {
|
|
310
|
-
this.setState({
|
|
311
|
-
HamburgerMenuOpen: !HamburgerMenuOpen,
|
|
312
|
-
isSnackBarOpen: true,
|
|
313
|
-
snackBarMessage: 'You should Login.'
|
|
314
|
-
});
|
|
315
|
-
}}
|
|
316
|
-
>
|
|
317
|
-
Save As...
|
|
318
|
-
</PS.SubTitle>
|
|
319
|
-
)}
|
|
320
|
-
|
|
321
|
-
<PS.Diver></PS.Diver>
|
|
322
|
-
{userInfo.role === 'designer' ||
|
|
323
|
-
userInfo.role === 'customer' ||
|
|
324
|
-
userInfo.role === 'superdesigner' ||
|
|
325
|
-
userInfo.role === 'superadmin' ? (
|
|
326
|
-
<PS.SubTitle onClick={snaplibrary}>Open Project</PS.SubTitle>
|
|
327
|
-
) : null}
|
|
328
|
-
{/* <PS.PositionValue>Rotate</PS.PositionValue>
|
|
329
|
-
<PS.PositionValue>Resize</PS.PositionValue> */}
|
|
330
|
-
</PS.ContentWrapper>
|
|
331
|
-
</PS.SelectedWrapper>
|
|
332
|
-
);
|
|
333
|
-
}
|
|
334
|
-
return (
|
|
335
|
-
<div style={{ ...headerBarStyle, width, height }}>
|
|
336
|
-
<SnackBar
|
|
337
|
-
isOpen={this.state.isSnackBarOpen}
|
|
338
|
-
message={this.state.snackBarMessage}
|
|
339
|
-
handleClose={() =>
|
|
340
|
-
this.setState({ isSnackBarOpen: false, snackBarMessage: '' })
|
|
341
|
-
}
|
|
342
|
-
/>
|
|
343
|
-
<div style={{ display: 'flex', alignItems: 'center' }}>
|
|
344
|
-
<PS.LogoBox style={{ padding: 'unset' }}>
|
|
345
|
-
<a href={this.props.companyURL} target="_blank">
|
|
346
|
-
<img height="40px" src={this.props.logoImage} />
|
|
347
|
-
</a>
|
|
348
|
-
</PS.LogoBox>
|
|
349
|
-
<Popup
|
|
350
|
-
trigger={objectProperty}
|
|
351
|
-
open={this.state.HamburgerMenuOpen}
|
|
352
|
-
arrow={false}
|
|
353
|
-
/>
|
|
354
|
-
<div
|
|
355
|
-
style={{
|
|
356
|
-
display: 'flex',
|
|
357
|
-
alignItems: 'center',
|
|
358
|
-
fontFamily: DEFAULT_FONT_FAMILY,
|
|
359
|
-
fontSize: 13,
|
|
360
|
-
fontWeight: 600,
|
|
361
|
-
lineHeight: '18px',
|
|
362
|
-
textAlign: 'center'
|
|
363
|
-
}}
|
|
364
|
-
>
|
|
365
|
-
<p
|
|
366
|
-
style={{
|
|
367
|
-
color: TEXT_COLOR_NEUTRAL_3,
|
|
368
|
-
fontSize: '16px',
|
|
369
|
-
fontWeight: 600,
|
|
370
|
-
lineHeight: '22px',
|
|
371
|
-
textAlign: 'center'
|
|
372
|
-
}}
|
|
373
|
-
>
|
|
374
|
-
Drafts
|
|
375
|
-
</p>
|
|
376
|
-
<p style={{ color: TEXT_COLOR_NEUTRAL_0, margin: '0px 3px' }}>/</p>
|
|
377
|
-
{renameForm ? (
|
|
378
|
-
<div className="header-projectname-wrapper">
|
|
379
|
-
<PS.InputStyle>
|
|
380
|
-
<FormTextInput
|
|
381
|
-
value={projectTitle ? projectTitle : renameTitle}
|
|
382
|
-
onChange={e => {
|
|
383
|
-
this.onRenameTitleChange(e);
|
|
384
|
-
}}
|
|
385
|
-
style={inputStyle}
|
|
386
|
-
onKeyDown={e => {
|
|
387
|
-
var keyCode = e.keyCode || e.which;
|
|
388
|
-
if (keyCode == KEYBOARD_BUTTON_CODE.ENTER) {
|
|
389
|
-
if (saveAsBtnClicked) {
|
|
390
|
-
saveProject(e);
|
|
391
|
-
}
|
|
392
|
-
this.renameFormToggle(false, false);
|
|
393
|
-
}
|
|
394
|
-
}}
|
|
395
|
-
/>
|
|
396
|
-
</PS.InputStyle>
|
|
397
|
-
</div>
|
|
398
|
-
) : (
|
|
399
|
-
<div className="header-projectname-wrapper">
|
|
400
|
-
<p
|
|
401
|
-
style={{ color: TEXT_COLOR_NEUTRAL_0 }}
|
|
402
|
-
onClick={
|
|
403
|
-
isModalVisible
|
|
404
|
-
? null
|
|
405
|
-
: () => this.renameFormToggle(true, saveAsBtnClicked)
|
|
406
|
-
}
|
|
407
|
-
>
|
|
408
|
-
{projectTitle ? projectTitle : renameTitle}
|
|
409
|
-
</p>
|
|
410
|
-
{/* <PS.EditBox >
|
|
411
|
-
<IconButton className='padding-5'><EditOutlined /></IconButton>
|
|
412
|
-
</PS.EditBox> */}
|
|
413
|
-
</div>
|
|
414
|
-
)}
|
|
415
|
-
</div>
|
|
416
|
-
</div>
|
|
417
|
-
|
|
418
|
-
<div
|
|
419
|
-
style={{
|
|
420
|
-
display: 'flex',
|
|
421
|
-
alignItems: 'center',
|
|
422
|
-
gap: '1rem',
|
|
423
|
-
width: '100%'
|
|
424
|
-
}}
|
|
425
|
-
>
|
|
426
|
-
{!this.props.allVisible && (
|
|
427
|
-
<SaveButton
|
|
428
|
-
isSaved={this.props.isSaved}
|
|
429
|
-
handleSaveBtn={() => {
|
|
430
|
-
let showPrompt = false;
|
|
431
|
-
if (!this.props.isTokenPresent) {
|
|
432
|
-
showPrompt = true;
|
|
433
|
-
}
|
|
434
|
-
if (this.props.isTokenPresent && this.props.isSaved) {
|
|
435
|
-
showPrompt = true;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
return handleSaveBtn({
|
|
439
|
-
showPrompt
|
|
440
|
-
});
|
|
441
|
-
}}
|
|
442
|
-
isLoading={isLoading}
|
|
443
|
-
/>
|
|
444
|
-
)}
|
|
445
|
-
|
|
446
|
-
{!this.props.allVisible && (
|
|
447
|
-
<PS.SelectedBox onClick={isModalVisible ? null : newProjectBtn}>
|
|
448
|
-
<img height="18px" src="/assets/img/svg/headerbar/plus.svg" />
|
|
449
|
-
<PS.SelectTitle style={{ marginRight: 10 }}>
|
|
450
|
-
{NEW_DESIGN}
|
|
451
|
-
</PS.SelectTitle>
|
|
452
|
-
</PS.SelectedBox>
|
|
453
|
-
)}
|
|
454
|
-
<div
|
|
455
|
-
style={{
|
|
456
|
-
flex: 1
|
|
457
|
-
}}
|
|
458
|
-
/>
|
|
459
|
-
{!this.props.allVisible && (
|
|
460
|
-
<Tooltip
|
|
461
|
-
title={
|
|
462
|
-
!this.props.isTokenPresent ? (
|
|
463
|
-
<span
|
|
464
|
-
style={{
|
|
465
|
-
fontSize: 14
|
|
466
|
-
}}
|
|
467
|
-
>
|
|
468
|
-
You need to <b>save the project</b> before requesting
|
|
469
|
-
Designer Assistance.
|
|
470
|
-
</span>
|
|
471
|
-
) : (
|
|
472
|
-
''
|
|
473
|
-
)
|
|
474
|
-
}
|
|
475
|
-
>
|
|
476
|
-
<PS.SelectedBox
|
|
477
|
-
onClick={
|
|
478
|
-
isModalVisible
|
|
479
|
-
? null
|
|
480
|
-
: () => {
|
|
481
|
-
if (!this.props.isTokenPresent) {
|
|
482
|
-
this.props.handleSubmitPrompt(SUBMIT_REQUEST_ASSIST);
|
|
483
|
-
} else {
|
|
484
|
-
if (!this.props.isSaved) {
|
|
485
|
-
handleSaveBtn({
|
|
486
|
-
showPrompt: !this.props.isTokenPresent
|
|
487
|
-
});
|
|
488
|
-
}
|
|
489
|
-
handleSubmitForQuote(true, SUBMIT_REQUEST_ASSIST);
|
|
490
|
-
}
|
|
491
|
-
this.props.setToolbar('');
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
>
|
|
495
|
-
<img height="18px" src="\assets\img\svg\headerbar\assist.svg" />
|
|
496
|
-
<PS.SelectTitle>{SUBMIT_DESIGN}</PS.SelectTitle>
|
|
497
|
-
{!this.props.isTokenPresent && (
|
|
498
|
-
<div
|
|
499
|
-
style={{
|
|
500
|
-
width: '5px',
|
|
501
|
-
height: '5px',
|
|
502
|
-
position: 'relative'
|
|
503
|
-
}}
|
|
504
|
-
>
|
|
505
|
-
<InfoIcon
|
|
506
|
-
style={{
|
|
507
|
-
color: 'rgb(76, 18, 161)',
|
|
508
|
-
position: 'absolute',
|
|
509
|
-
width: '15px',
|
|
510
|
-
height: '15px',
|
|
511
|
-
bottom: '8px',
|
|
512
|
-
right: '-16px'
|
|
513
|
-
}}
|
|
514
|
-
/>
|
|
515
|
-
</div>
|
|
516
|
-
)}
|
|
517
|
-
</PS.SelectedBox>
|
|
518
|
-
</Tooltip>
|
|
519
|
-
)}
|
|
520
|
-
{/*{!this.props.allVisible && (*/}
|
|
521
|
-
{/* <PS.SelectedBox*/}
|
|
522
|
-
{/* onClick={*/}
|
|
523
|
-
{/* isModalVisible*/}
|
|
524
|
-
{/* ? null*/}
|
|
525
|
-
{/* : () => {*/}
|
|
526
|
-
{/* projectActions.setIsHelp(!state.isHelp);*/}
|
|
527
|
-
{/* }*/}
|
|
528
|
-
{/* }*/}
|
|
529
|
-
{/* >*/}
|
|
530
|
-
{/* <img height="18px" src="/assets/img/svg/bottombar/help.svg" />*/}
|
|
531
|
-
{/* <PS.SelectTitle>Help Center</PS.SelectTitle>*/}
|
|
532
|
-
{/* </PS.SelectedBox>*/}
|
|
533
|
-
{/*)}*/}
|
|
534
|
-
{!this.props.allVisible && (
|
|
535
|
-
<Tooltip
|
|
536
|
-
title={
|
|
537
|
-
!this.props.isTokenPresent ? (
|
|
538
|
-
<span
|
|
539
|
-
style={{
|
|
540
|
-
fontSize: 14
|
|
541
|
-
}}
|
|
542
|
-
>
|
|
543
|
-
You need to <b>save the project</b> before Adding to Cart
|
|
544
|
-
</span>
|
|
545
|
-
) : (
|
|
546
|
-
''
|
|
547
|
-
)
|
|
548
|
-
}
|
|
549
|
-
>
|
|
550
|
-
<Button
|
|
551
|
-
variant="outlined"
|
|
552
|
-
onClick={() => {
|
|
553
|
-
if (!this.props.isTokenPresent) {
|
|
554
|
-
handleSubmitPrompt(SUBMIT_ADD_CART);
|
|
555
|
-
} else {
|
|
556
|
-
if (!this.props.isSaved) {
|
|
557
|
-
handleSaveBtn({
|
|
558
|
-
showPrompt: !this.props.isTokenPresent
|
|
559
|
-
});
|
|
560
|
-
}
|
|
561
|
-
handleSubmitForQuote(true, SUBMIT_ADD_CART);
|
|
562
|
-
}
|
|
563
|
-
}}
|
|
564
|
-
disabled={isLoading}
|
|
565
|
-
style={{
|
|
566
|
-
pointerEvents: isLoading ? 'none' : 'auto',
|
|
567
|
-
padding: '8px 20px',
|
|
568
|
-
color: 'white',
|
|
569
|
-
backgroundColor: 'rgba(76, 18, 161, 1)',
|
|
570
|
-
border: '1px solid rgba(76, 18, 161, 1)',
|
|
571
|
-
marginLeft: '1rem',
|
|
572
|
-
textTransform: 'none',
|
|
573
|
-
display: 'flex',
|
|
574
|
-
alignItems: 'center'
|
|
575
|
-
}}
|
|
576
|
-
startIcon={
|
|
577
|
-
<img
|
|
578
|
-
style={{
|
|
579
|
-
color: 'white'
|
|
580
|
-
}}
|
|
581
|
-
src="\assets\img\svg\headerbar\cart.svg"
|
|
582
|
-
/>
|
|
583
|
-
}
|
|
584
|
-
endIcon={
|
|
585
|
-
!this.props.isTokenPresent && (
|
|
586
|
-
<div
|
|
587
|
-
style={{
|
|
588
|
-
width: '5px',
|
|
589
|
-
height: '5px',
|
|
590
|
-
position: 'relative'
|
|
591
|
-
}}
|
|
592
|
-
>
|
|
593
|
-
<InfoIcon
|
|
594
|
-
style={{
|
|
595
|
-
position: 'absolute',
|
|
596
|
-
width: '15px',
|
|
597
|
-
height: '15px',
|
|
598
|
-
bottom: '8px',
|
|
599
|
-
right: '-16px'
|
|
600
|
-
}}
|
|
601
|
-
/>
|
|
602
|
-
</div>
|
|
603
|
-
)
|
|
604
|
-
}
|
|
605
|
-
>
|
|
606
|
-
Add to Cart
|
|
607
|
-
</Button>
|
|
608
|
-
</Tooltip>
|
|
609
|
-
)}
|
|
610
|
-
</div>
|
|
611
|
-
</div>
|
|
612
|
-
);
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
Header.propTypes = {
|
|
617
|
-
state: PropTypes.object.isRequired,
|
|
618
|
-
width: PropTypes.number.isRequired,
|
|
619
|
-
height: PropTypes.number.isRequired
|
|
620
|
-
};
|
|
621
|
-
|
|
622
|
-
Header.contextTypes = {
|
|
623
|
-
projectActions: PropTypes.object.isRequired,
|
|
624
|
-
viewer2DActions: PropTypes.object.isRequired,
|
|
625
|
-
viewer3DActions: PropTypes.object.isRequired,
|
|
626
|
-
linesActions: PropTypes.object.isRequired,
|
|
627
|
-
holesActions: PropTypes.object.isRequired,
|
|
628
|
-
itemsActions: PropTypes.object.isRequired,
|
|
629
|
-
userActions: PropTypes.object.isRequired,
|
|
630
|
-
translator: PropTypes.object.isRequired
|
|
631
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
.header-projectname-wrapper {
|
|
2
|
-
display: flex;
|
|
3
|
-
font-family: 'Open Sans';
|
|
4
|
-
font-size: 13px;
|
|
5
|
-
font-weight: 600;
|
|
6
|
-
line-height: 18px;
|
|
7
|
-
text-align: center;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
@media screen and (min-width: 1024) {
|
|
11
|
-
.header-projectname-wrapper {
|
|
12
|
-
font-size: 9px;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
@media screen and (max-width: 1024) {
|
|
16
|
-
.header-projectname-wrapper {
|
|
17
|
-
font-size: 9px;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
@media screen and (min-width: 1366) {
|
|
21
|
-
.header-projectname-wrapper {
|
|
22
|
-
font-size: 13px;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
@media screen and (max-width: 1366) {
|
|
26
|
-
.header-projectname-wrapper {
|
|
27
|
-
font-size: 13px;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
@media screen and (min-width: 1440) {
|
|
31
|
-
.header-projectname-wrapper {
|
|
32
|
-
font-size: 16px;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
@media screen and (max-width: 1440) {
|
|
36
|
-
.header-projectname-wrapper {
|
|
37
|
-
font-size: 16px;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
.header-projectname-display {
|
|
41
|
-
margin-top: 8px;
|
|
42
|
-
margin-right: 2px;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.padding-5 {
|
|
46
|
-
padding: 5px !important;
|
|
47
|
-
}
|