kitchen-simulator 5.0.0-test.17 → 5.0.0-test.19
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 +8 -18
- package/src/@history.js +3 -0
- package/src/CrossSignOn.jsx +94 -0
- package/src/KitchenConfigurator.jsx +1526 -0
- package/src/KitchenConfiguratorApp.jsx +1 -1
- package/src/_KitchenConfigurator.jsx +3 -91
- package/src/components/atoms/Snackbar/index.jsx +43 -0
- package/src/components/atoms/radio-button/index.jsx +20 -0
- package/src/components/atoms/radio-button/styles.js +56 -0
- package/src/components/button/MainButton.jsx +157 -0
- package/src/components/button/ToggleMeasureButton.jsx +65 -0
- package/src/components/catalog-view/catalog-breadcrumb.jsx +53 -0
- package/src/components/catalog-view/catalog-item.jsx +229 -0
- package/src/components/catalog-view/catalog-list.jsx +173 -0
- package/src/components/catalog-view/catalog-page-item.jsx +110 -0
- package/src/components/catalog-view/catalog-turn-back-page-item.jsx +80 -0
- package/src/components/configurator/custom-configurator.jsx +77 -0
- package/src/components/configurator/project-configurator.jsx +120 -0
- package/src/components/content.jsx +136 -0
- package/src/components/export.js +36 -0
- package/src/components/firstsetting/button/styles.js +223 -0
- package/src/components/firstsetting/export.js +9 -0
- package/src/components/firstsetting/firstsetting-content-button.jsx +198 -0
- package/src/components/firstsetting/firstsetting-toggle-button.jsx +101 -0
- package/src/components/firstsetting/firstsetting.jsx +814 -0
- package/src/components/footerbar/button/ControlButton.jsx +43 -0
- package/src/components/footerbar/button/DirectionButton.jsx +54 -0
- package/src/components/footerbar/button/DirectionPanSpinButton.jsx +36 -0
- package/src/components/footerbar/button/ToggleButton.jsx +58 -0
- package/src/components/footerbar/button/ToggleConvertButton.jsx +48 -0
- package/src/components/footerbar/button/ToggleMeasureButton.jsx +33 -0
- package/src/components/footerbar/button/styles.js +217 -0
- package/src/components/footerbar/export.js +9 -0
- package/src/components/footerbar/footer-content-button.jsx +198 -0
- package/src/components/footerbar/footer-toggle-button.jsx +101 -0
- package/src/components/footerbar/footerbar.jsx +1103 -0
- package/src/components/footerbar/styles.js +263 -0
- package/src/components/header/button/MenuButton.jsx +46 -0
- package/src/components/header/button/SaveButton.jsx +54 -0
- package/src/components/header/button/styles.js +181 -0
- package/src/components/header/export.js +5 -0
- package/src/components/header/header.jsx +631 -0
- package/src/components/header/header.style.css +47 -0
- package/src/components/header/styles.js +320 -0
- package/src/components/login/Login.js +77 -0
- package/src/components/login/LoginForm/index.js +108 -0
- package/src/components/login/Register.js +82 -0
- package/src/components/login/RegisterForm/index.js +171 -0
- package/src/components/login/jwtService.js +201 -0
- package/src/components/login/style.css +158 -0
- package/src/components/login/style.scss +260 -0
- package/src/components/molecules/slider/index.jsx +15 -0
- package/src/components/molecules/slider/styles.js +0 -0
- package/src/components/molecules/slider/styles.scss +3 -0
- package/src/components/myprojects/export.js +5 -0
- package/src/components/myprojects/index.jsx +445 -0
- package/src/components/myprojects/styles.js +241 -0
- package/src/components/sidebar/custom-accordion.jsx +48 -0
- package/src/components/sidebar/export.js +15 -0
- package/src/components/sidebar/panel-element-editor/attributes-editor/attributes-editor.jsx +73 -0
- package/src/components/sidebar/panel-element-editor/attributes-editor/confirm-popup.jsx +101 -0
- package/src/components/sidebar/panel-element-editor/attributes-editor/hole-attributes-editor.jsx +149 -0
- package/src/components/sidebar/panel-element-editor/attributes-editor/item-attributes-editor.jsx +316 -0
- package/src/components/sidebar/panel-element-editor/attributes-editor/line-attributes-editor.jsx +108 -0
- package/src/components/sidebar/panel-element-editor/element-editor.jsx +1070 -0
- package/src/components/sidebar/panel-element-editor/multi-elements-editor.jsx +0 -0
- package/src/components/sidebar/panel-element-editor/panel-element-editor.jsx +104 -0
- package/src/components/sidebar/panel-element-editor/panel-multi-elements-editor.jsx +155 -0
- package/src/components/sidebar/panel-group-editor.jsx +272 -0
- package/src/components/sidebar/panel-groups.jsx +310 -0
- package/src/components/sidebar/panel-guides.jsx +192 -0
- package/src/components/sidebar/panel-layer-elements.jsx +298 -0
- package/src/components/sidebar/panel-layers.jsx +381 -0
- package/src/components/sidebar/panel.jsx +71 -0
- package/src/components/sidebar/sidebar.jsx +106 -0
- package/src/components/sidebar/toolbar-panel.jsx +139 -0
- package/src/components/sign/export.js +7 -0
- package/src/components/sign/main/index.jsx +523 -0
- package/src/components/sign/main/styles.js +163 -0
- package/src/components/style/button.jsx +95 -0
- package/src/components/style/cancel-button.jsx +20 -0
- package/src/components/style/content-container.jsx +29 -0
- package/src/components/style/content-title.jsx +20 -0
- package/src/components/style/delete-button.jsx +23 -0
- package/src/components/style/export.jsx +48 -0
- package/src/components/style/form-block.jsx +13 -0
- package/src/components/style/form-color-input.jsx +27 -0
- package/src/components/style/form-label.jsx +15 -0
- package/src/components/style/form-number-input.jsx +196 -0
- package/src/components/style/form-number-input_2.jsx +191 -0
- package/src/components/style/form-select.jsx +38 -0
- package/src/components/style/form-slider.jsx +36 -0
- package/src/components/style/form-submit-button.jsx +23 -0
- package/src/components/style/form-text-input.jsx +65 -0
- package/src/components/toolbar/button/ControlButton.jsx +41 -0
- package/src/components/toolbar/button/DirectionButton.jsx +34 -0
- package/src/components/toolbar/button/RightButton.jsx +103 -0
- package/src/components/toolbar/button/ToggleButton.jsx +41 -0
- package/src/components/toolbar/button/index.jsx +55 -0
- package/src/components/toolbar/button/styles.js +127 -0
- package/src/components/toolbar/components/DoorStyleMenu.jsx +103 -0
- package/src/components/toolbar/components/Pricing.jsx +126 -0
- package/src/components/toolbar/components/ReviewForQuote.jsx +635 -0
- package/src/components/toolbar/export.js +21 -0
- package/src/components/toolbar/main/Alert.js +122 -0
- package/src/components/toolbar/main/TakePictureModal.jsx +104 -0
- package/src/components/toolbar/main/confirm-popup.jsx +99 -0
- package/src/components/toolbar/main/index.jsx +5627 -0
- package/src/components/toolbar/main/lShaped.json +311 -0
- package/src/components/toolbar/main/longNarrow.json +238 -0
- package/src/components/toolbar/main/myComponents.js +123 -0
- package/src/components/toolbar/main/oRectangle.json +220 -0
- package/src/components/toolbar/main/rectangle.json +238 -0
- package/src/components/toolbar/main/style.css +107 -0
- package/src/components/toolbar/main/styles.js +696 -0
- package/src/components/toolbar/plugin-item.jsx +123 -0
- package/src/components/toolbar/popup/appliance/appliance-category/index.jsx +73 -0
- package/src/components/toolbar/popup/appliance/choose-appliance/index.jsx +102 -0
- package/src/components/toolbar/popup/appliance/index.jsx +83 -0
- package/src/components/toolbar/popup/autosaveprompt/index.jsx +150 -0
- package/src/components/toolbar/popup/autosaveprompt/styles.css +64 -0
- package/src/components/toolbar/popup/autosaveprompt/styles.js +40 -0
- package/src/components/toolbar/popup/cabinet/cabinet-category/index.jsx +73 -0
- package/src/components/toolbar/popup/cabinet/choose-product/index.jsx +119 -0
- package/src/components/toolbar/popup/cabinet/index.jsx +85 -0
- package/src/components/toolbar/popup/doorStyle/choose-style/index.jsx +63 -0
- package/src/components/toolbar/popup/doorStyle/index.jsx +71 -0
- package/src/components/toolbar/popup/doorStyle/style-category/index.jsx +139 -0
- package/src/components/toolbar/popup/downloadsummary/downloadSummaryContext.js +2 -0
- package/src/components/toolbar/popup/downloadsummary/downloadSummaryTemp.jsx +157 -0
- package/src/components/toolbar/popup/downloadsummary/index.jsx +643 -0
- package/src/components/toolbar/popup/downloadsummary/show2D/show2DView.jsx +51 -0
- package/src/components/toolbar/popup/downloadsummary/show2D/viewer2DDownLoad.jsx +175 -0
- package/src/components/toolbar/popup/downloadsummary/show3D/show3DView.jsx +283 -0
- package/src/components/toolbar/popup/downloadsummary/show3D/viewer3DDownLoad.jsx +2257 -0
- package/src/components/toolbar/popup/downloadsummary/showCabinetInfo.js +93 -0
- package/src/components/toolbar/popup/downloadsummary/showElevation/showElevationView.jsx +132 -0
- package/src/components/toolbar/popup/downloadsummary/showElevation/viewer3DElevationDownload.jsx +2198 -0
- package/src/components/toolbar/popup/downloadsummary/showElevation/viewerElevationDownload.jsx +152 -0
- package/src/components/toolbar/popup/downloadsummary/showWarranty.jsx +149 -0
- package/src/components/toolbar/popup/downloadsummary/styles.css +177 -0
- package/src/components/toolbar/popup/downloadsummary/styles.js +453 -0
- package/src/components/toolbar/popup/finishingtouch/category/index.jsx +34 -0
- package/src/components/toolbar/popup/finishingtouch/index.jsx +58 -0
- package/src/components/toolbar/popup/finishingtouch/material-edit.jsx +112 -0
- package/src/components/toolbar/popup/finishingtouch/product/index.jsx +116 -0
- package/src/components/toolbar/popup/floorplan/choose-floor/confirm-popup.jsx +101 -0
- package/src/components/toolbar/popup/floorplan/choose-floor/index.jsx +254 -0
- package/src/components/toolbar/popup/floorplan/choose-floor/lShaped.json +311 -0
- package/src/components/toolbar/popup/floorplan/choose-floor/longNarrow.json +238 -0
- package/src/components/toolbar/popup/floorplan/choose-floor/oRectangle.json +220 -0
- package/src/components/toolbar/popup/floorplan/choose-floor/rectangle.json +238 -0
- package/src/components/toolbar/popup/floorplan/choose-floor/styles.js +86 -0
- package/src/components/toolbar/popup/floorplan/floor-category/index.jsx +109 -0
- package/src/components/toolbar/popup/floorplan/index.jsx +60 -0
- package/src/components/toolbar/popup/index.jsx +241 -0
- package/src/components/toolbar/popup/newproject/index.jsx +59 -0
- package/src/components/toolbar/popup/newproject/styles.css +64 -0
- package/src/components/toolbar/popup/newproject/styles.js +41 -0
- package/src/components/toolbar/popup/product/appliance.jsx +54 -0
- package/src/components/toolbar/popup/product/cabinetproduct.jsx +15 -0
- package/src/components/toolbar/popup/product/doorstyle.jsx +58 -0
- package/src/components/toolbar/popup/product/doorstyleproduct.jsx +47 -0
- package/src/components/toolbar/popup/product/floor.jsx +36 -0
- package/src/components/toolbar/popup/product/floorproduct.jsx +42 -0
- package/src/components/toolbar/popup/product/index.jsx +36 -0
- package/src/components/toolbar/popup/product/primary.jsx +77 -0
- package/src/components/toolbar/popup/product/productline.jsx +93 -0
- package/src/components/toolbar/popup/product/reviewItem.jsx +427 -0
- package/src/components/toolbar/popup/product/reviewMolding.jsx +310 -0
- package/src/components/toolbar/popup/product/style.css +54 -0
- package/src/components/toolbar/popup/product/styles.js +260 -0
- package/src/components/toolbar/popup/savedesign/FullPictureForm.jsx +146 -0
- package/src/components/toolbar/popup/savedesign/index.jsx +495 -0
- package/src/components/toolbar/popup/savedesign/savedesign.style.css +16 -0
- package/src/components/toolbar/popup/savedesign/styles.js +151 -0
- package/src/components/toolbar/popup/setDoorStyleOption/index.jsx +87 -0
- package/src/components/toolbar/popup/styles.js +909 -0
- package/src/components/toolbar/popup/submitforquote/AddToCartOptions.jsx +192 -0
- package/src/components/toolbar/popup/submitforquote/CustomerRequestsForm.jsx +96 -0
- package/src/components/toolbar/popup/submitforquote/SkipDesignerReview.jsx +54 -0
- package/src/components/toolbar/popup/submitforquote/StepDots.jsx +25 -0
- package/src/components/toolbar/popup/submitforquote/cart-choice.jsx +116 -0
- package/src/components/toolbar/popup/submitforquote/doorstyle-menus.js +38 -0
- package/src/components/toolbar/popup/submitforquote/index.jsx +698 -0
- package/src/components/toolbar/popup/submitforquote/styles.css +105 -0
- package/src/components/toolbar/popup/submitforquote/styles.js +294 -0
- package/src/components/toolbar/popup/submitprompt/index.jsx +89 -0
- package/src/components/toolbar/popup/submitprompt/styles.css +64 -0
- package/src/components/toolbar/popup/submitprompt/styles.js +42 -0
- package/src/components/toolbar/toolbar-button.jsx +90 -0
- package/src/components/toolbar/toolbar-load-button.jsx +36 -0
- package/src/components/toolbar/toolbar-save-button.jsx +32 -0
- package/src/components/tutorial-view/Modal.jsx +584 -0
- package/src/components/tutorial-view/style.css +111 -0
- package/src/components/tutorial-view/styles.js +65 -0
- package/src/components/wizardstep/button/styles.js +677 -0
- package/src/components/wizardstep/export.js +5 -0
- package/src/components/wizardstep/index.jsx +1372 -0
- package/src/components/wizardstep/styles.js +688 -0
- package/src/components/wizardstep/wizardstep-content-button.jsx +198 -0
- package/src/components/wizardstep/wizardstep-toggle-button.jsx +101 -0
- package/src/{_index.js → index.js} +4 -4
- package/src/renderer.jsx +466 -0
- package/src/actions/_export.js +0 -35
- package/src/components/_export.js +0 -11
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as SharedStyle from '../../shared-style';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import {
|
|
5
|
+
TEXT_COLOR_NEUTRAL_3,
|
|
6
|
+
DEFAULT_FONT_FAMILY,
|
|
7
|
+
SECONDARY_PURPLE_COLOR
|
|
8
|
+
} from '../../constants';
|
|
9
|
+
|
|
10
|
+
const StyledSelect = styled.select`
|
|
11
|
+
display: block;
|
|
12
|
+
width: 120px;
|
|
13
|
+
float: right;
|
|
14
|
+
padding: 15px 10px 12px 0px;
|
|
15
|
+
color: ${TEXT_COLOR_NEUTRAL_3};
|
|
16
|
+
border: 2px solid;
|
|
17
|
+
font-family: ${DEFAULT_FONT_FAMILY};
|
|
18
|
+
font-size: 12px;
|
|
19
|
+
font-weight: 600;
|
|
20
|
+
line-height: 17px;
|
|
21
|
+
text-align: right;
|
|
22
|
+
outline: none;
|
|
23
|
+
border-radius: 5px;
|
|
24
|
+
:hover {
|
|
25
|
+
border-color: ${SECONDARY_PURPLE_COLOR};
|
|
26
|
+
}
|
|
27
|
+
:focus {
|
|
28
|
+
border-color: ${SECONDARY_PURPLE_COLOR};
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
|
|
32
|
+
export default function FormSelect({ children, style, ...rest }) {
|
|
33
|
+
return (
|
|
34
|
+
<StyledSelect type="text" style={style} {...rest}>
|
|
35
|
+
{children}
|
|
36
|
+
</StyledSelect>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactRange from '@mapbox/react-range';
|
|
3
|
+
import FormTextInput from './form-text-input';
|
|
4
|
+
|
|
5
|
+
const sliderContainerStyle = {
|
|
6
|
+
display: 'inline-block',
|
|
7
|
+
width: '80%',
|
|
8
|
+
marginRight: '5%'
|
|
9
|
+
};
|
|
10
|
+
const sliderStyle = { display: 'block', width: '100%', height: '30px' };
|
|
11
|
+
const textContainerStyle = {
|
|
12
|
+
display: 'inline-block',
|
|
13
|
+
width: '15%',
|
|
14
|
+
float: 'right'
|
|
15
|
+
};
|
|
16
|
+
const textStyle = { height: '34px', textAlign: 'center' };
|
|
17
|
+
|
|
18
|
+
export default function FormNumberInput({ value, onChange, ...rest }) {
|
|
19
|
+
return (
|
|
20
|
+
<div>
|
|
21
|
+
<div style={sliderContainerStyle}>
|
|
22
|
+
<ReactRange
|
|
23
|
+
type="range"
|
|
24
|
+
style={sliderStyle}
|
|
25
|
+
onChange={onChange}
|
|
26
|
+
value={value}
|
|
27
|
+
{...rest}
|
|
28
|
+
/>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div style={textContainerStyle}>
|
|
32
|
+
<FormTextInput value={value} onChange={onChange} style={textStyle} />
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Button from './button';
|
|
3
|
+
import * as SharedStyle from '../../shared-style';
|
|
4
|
+
|
|
5
|
+
const STYLE = {
|
|
6
|
+
borderColor: '#415375',
|
|
7
|
+
backgroundColor: '#415375',
|
|
8
|
+
color: SharedStyle.COLORS.white
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const STYLE_HOVER = {
|
|
12
|
+
borderColor: '#1f3149',
|
|
13
|
+
backgroundColor: '#1f3149',
|
|
14
|
+
color: SharedStyle.COLORS.white
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default function FormSubmitButton({ children, ...rest }) {
|
|
18
|
+
return (
|
|
19
|
+
<Button type="submit" style={STYLE} styleHover={STYLE_HOVER} {...rest}>
|
|
20
|
+
{children}
|
|
21
|
+
</Button>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import * as SharedStyle from '../../shared-style';
|
|
3
|
+
import {
|
|
4
|
+
PROJECT_NAME_LENGTH_LIMIT,
|
|
5
|
+
TEXT_COLOR_NEUTRAL_3,
|
|
6
|
+
BG_COLOR_0,
|
|
7
|
+
DEFAULT_FONT_FAMILY,
|
|
8
|
+
SECONDARY_PURPLE_COLOR
|
|
9
|
+
} from '../../constants';
|
|
10
|
+
import styled from 'styled-components';
|
|
11
|
+
|
|
12
|
+
const StyledInput = styled.input`
|
|
13
|
+
display: block;
|
|
14
|
+
padding: 15px 10px 12px 0px;
|
|
15
|
+
width: 120px;
|
|
16
|
+
font-family: ${DEFAULT_FONT_FAMILY};
|
|
17
|
+
font-size: 12px;
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
line-height: 17px;
|
|
20
|
+
color: ${TEXT_COLOR_NEUTRAL_3};
|
|
21
|
+
background-color: ${BG_COLOR_0};
|
|
22
|
+
border: 2px solid;
|
|
23
|
+
text-align: right;
|
|
24
|
+
float: right;
|
|
25
|
+
border-radius: 5px;
|
|
26
|
+
outline: 0;
|
|
27
|
+
:focus {
|
|
28
|
+
border-color: ${SECONDARY_PURPLE_COLOR};
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
|
|
32
|
+
export default class FormTextInput extends Component {
|
|
33
|
+
constructor(props) {
|
|
34
|
+
super(props);
|
|
35
|
+
this.state = { focus: false };
|
|
36
|
+
this.input = React.createRef(null);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
componentDidMount() {
|
|
40
|
+
if (this.input.current) {
|
|
41
|
+
this.input.current.select();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
render() {
|
|
46
|
+
let { style, ...rest } = this.props;
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<StyledInput
|
|
50
|
+
ref={this.input}
|
|
51
|
+
onFocus={e => this.setState({ focus: true })}
|
|
52
|
+
onBlur={e => this.setState({ focus: false })}
|
|
53
|
+
style={style}
|
|
54
|
+
// autoFocus
|
|
55
|
+
type="text"
|
|
56
|
+
{...rest}
|
|
57
|
+
maxLength={PROJECT_NAME_LENGTH_LIMIT}
|
|
58
|
+
/>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
FormTextInput.defaultProps = {
|
|
64
|
+
style: {}
|
|
65
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import * as SharedStyle from '../../../shared-style';
|
|
4
|
+
import * as S from './styles';
|
|
5
|
+
|
|
6
|
+
export default class ControlButton extends Component {
|
|
7
|
+
constructor(props, context) {
|
|
8
|
+
super(props, context);
|
|
9
|
+
this.state = { hover: false };
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
render() {
|
|
13
|
+
let { state, props } = this;
|
|
14
|
+
let overlayStyle = {};
|
|
15
|
+
if (state.hover) overlayStyle = { ...overlayStyle, display: 'block' };
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<S.Control
|
|
19
|
+
onMouseOver={event => this.setState({ hover: true })}
|
|
20
|
+
onMouseOut={event => this.setState({ hover: false })}
|
|
21
|
+
onClick={props.onClick}
|
|
22
|
+
>
|
|
23
|
+
{[
|
|
24
|
+
props.title !== undefined ? (
|
|
25
|
+
<S.ControlTitle key={props.title}>{props.title}</S.ControlTitle>
|
|
26
|
+
) : null,
|
|
27
|
+
props.icon !== undefined ? (
|
|
28
|
+
<S.ControlIcon key={props.icon}>{props.icon}</S.ControlIcon>
|
|
29
|
+
) : null
|
|
30
|
+
]}
|
|
31
|
+
</S.Control>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
ControlButton.propTypes = {
|
|
37
|
+
title: PropTypes.string,
|
|
38
|
+
hover: PropTypes.bool,
|
|
39
|
+
active: PropTypes.bool.isRequired,
|
|
40
|
+
onClick: PropTypes.func
|
|
41
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import * as SharedStyle from '../../../shared-style';
|
|
4
|
+
import * as S from './styles';
|
|
5
|
+
|
|
6
|
+
export default class DirectionButton extends Component {
|
|
7
|
+
constructor(props, context) {
|
|
8
|
+
super(props, context);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
render() {
|
|
12
|
+
let { props } = this;
|
|
13
|
+
let overlayStyle = {};
|
|
14
|
+
overlayStyle = props.active
|
|
15
|
+
? { ...overlayStyle, background: SharedStyle.TOOLBAR_COLOR.active }
|
|
16
|
+
: { ...overlayStyle };
|
|
17
|
+
return (
|
|
18
|
+
<S.DirectionIcon
|
|
19
|
+
style={props.style}
|
|
20
|
+
onClick={props.onClick}
|
|
21
|
+
key={props.icon}
|
|
22
|
+
>
|
|
23
|
+
{props.icon}
|
|
24
|
+
</S.DirectionIcon>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
DirectionButton.propTypes = {
|
|
30
|
+
title: PropTypes.string,
|
|
31
|
+
hover: PropTypes.bool,
|
|
32
|
+
active: PropTypes.bool.isRequired,
|
|
33
|
+
onClick: PropTypes.func
|
|
34
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import * as S from './styles';
|
|
4
|
+
|
|
5
|
+
export default class RightButton extends Component {
|
|
6
|
+
constructor(props, context) {
|
|
7
|
+
super(props, context);
|
|
8
|
+
this.state = { hover: false };
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
render() {
|
|
12
|
+
let { state, props } = this;
|
|
13
|
+
let overlayStyle = {};
|
|
14
|
+
if (state.hover) overlayStyle = { ...overlayStyle, display: 'block' };
|
|
15
|
+
if (props.active) overlayStyle = { ...overlayStyle, display: 'block' };
|
|
16
|
+
return (
|
|
17
|
+
<S.rMain
|
|
18
|
+
onMouseOver={event => this.setState({ hover: true })}
|
|
19
|
+
onMouseOut={event => this.setState({ hover: false })}
|
|
20
|
+
onClick={props.onClick}
|
|
21
|
+
>
|
|
22
|
+
<S.rightIcon>{props.icon}</S.rightIcon>
|
|
23
|
+
|
|
24
|
+
<S.rOverlay style={{ ...overlayStyle }}>
|
|
25
|
+
<img width="40px" src={props.src} />
|
|
26
|
+
<S.rTitle>{props.title}</S.rTitle>
|
|
27
|
+
</S.rOverlay>
|
|
28
|
+
{/* {
|
|
29
|
+
state.active ?
|
|
30
|
+
<div style={STYLE_TOOLTIP}>
|
|
31
|
+
<span style={STYLE_TOOLTIP_PIN} />
|
|
32
|
+
{props.tooltip}
|
|
33
|
+
</div>
|
|
34
|
+
: null
|
|
35
|
+
} */}
|
|
36
|
+
</S.rMain>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
RightButton.propTypes = {
|
|
42
|
+
title: PropTypes.string,
|
|
43
|
+
hover: PropTypes.bool,
|
|
44
|
+
onClick: PropTypes.func
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export class RightTextButton extends Component {
|
|
48
|
+
constructor(props, context) {
|
|
49
|
+
super(props, context);
|
|
50
|
+
this.state = { hover: false };
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
render() {
|
|
54
|
+
let { state, props } = this;
|
|
55
|
+
return (
|
|
56
|
+
<S.rMain
|
|
57
|
+
onMouseOver={event => this.setState({ hover: true })}
|
|
58
|
+
onMouseOut={event => this.setState({ hover: false })}
|
|
59
|
+
onClick={props.onClick}
|
|
60
|
+
>
|
|
61
|
+
<S.rightIcon>{props.icon}</S.rightIcon>
|
|
62
|
+
|
|
63
|
+
{state.hover ? (
|
|
64
|
+
<S.rOverlay style={{ display: 'block' }}>
|
|
65
|
+
<img width="40px" src={props.src} />
|
|
66
|
+
<S.rTitle
|
|
67
|
+
style={{ top: '20px', paddingTop: '7px', paddingBottom: '7px' }}
|
|
68
|
+
>
|
|
69
|
+
{props.title}
|
|
70
|
+
</S.rTitle>
|
|
71
|
+
</S.rOverlay>
|
|
72
|
+
) : (
|
|
73
|
+
<S.rOverlay style={{ display: 'block' }}>
|
|
74
|
+
<S.rTitle
|
|
75
|
+
style={{
|
|
76
|
+
color: 'black',
|
|
77
|
+
top: '20px',
|
|
78
|
+
paddingTop: '7px',
|
|
79
|
+
paddingBottom: '7px'
|
|
80
|
+
}}
|
|
81
|
+
>
|
|
82
|
+
{props.title}
|
|
83
|
+
</S.rTitle>
|
|
84
|
+
</S.rOverlay>
|
|
85
|
+
)}
|
|
86
|
+
{/* {
|
|
87
|
+
state.active ?
|
|
88
|
+
<div style={STYLE_TOOLTIP}>
|
|
89
|
+
<span style={STYLE_TOOLTIP_PIN} />
|
|
90
|
+
{props.tooltip}
|
|
91
|
+
</div>
|
|
92
|
+
: null
|
|
93
|
+
} */}
|
|
94
|
+
</S.rMain>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
RightTextButton.propTypes = {
|
|
100
|
+
title: PropTypes.string,
|
|
101
|
+
hover: PropTypes.bool,
|
|
102
|
+
onClick: PropTypes.func
|
|
103
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import * as SharedStyle from '../../../shared-style';
|
|
4
|
+
import { MODE_IDLE_3D } from '../../../constants';
|
|
5
|
+
import * as S from './styles';
|
|
6
|
+
|
|
7
|
+
export default class ToggleButton extends Component {
|
|
8
|
+
constructor(props, context) {
|
|
9
|
+
super(props, context);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
render() {
|
|
13
|
+
let { props } = this;
|
|
14
|
+
let overlayStyle = {};
|
|
15
|
+
let activeStyle =
|
|
16
|
+
props.settingMode === MODE_IDLE_3D || props.active
|
|
17
|
+
? { paddingRight: '30px', paddingBottom: '2px' }
|
|
18
|
+
: { paddingLeft: '30px', paddingBottom: '2px' };
|
|
19
|
+
return (
|
|
20
|
+
<S.Toggle style={{ ...overlayStyle }} onClick={props.onClick}>
|
|
21
|
+
{[
|
|
22
|
+
props.title !== undefined ? (
|
|
23
|
+
<S.ControlTitle key={props.title}>{props.title}</S.ControlTitle>
|
|
24
|
+
) : null,
|
|
25
|
+
props.icon !== undefined ? (
|
|
26
|
+
<S.ToggleIcon style={{ ...activeStyle }} key={props.icon}>
|
|
27
|
+
{props.icon}
|
|
28
|
+
</S.ToggleIcon>
|
|
29
|
+
) : null
|
|
30
|
+
]}
|
|
31
|
+
</S.Toggle>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
ToggleButton.propTypes = {
|
|
37
|
+
title: PropTypes.string,
|
|
38
|
+
hover: PropTypes.bool,
|
|
39
|
+
active: PropTypes.bool.isRequired,
|
|
40
|
+
onClick: PropTypes.func
|
|
41
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
|
|
4
|
+
import * as S from './styles';
|
|
5
|
+
|
|
6
|
+
//http://www.cssportal.com/css-tooltip-generator/
|
|
7
|
+
|
|
8
|
+
export default class ToolbarButton extends Component {
|
|
9
|
+
constructor(props, context) {
|
|
10
|
+
super(props, context);
|
|
11
|
+
this.state = { hover: false };
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
render() {
|
|
15
|
+
let { state, props } = this;
|
|
16
|
+
const { active, onClick, children, src, title, ...otherProps } = props;
|
|
17
|
+
let overlayStyle = {};
|
|
18
|
+
if (state.hover) overlayStyle = { ...overlayStyle, display: 'block' };
|
|
19
|
+
// overlayStyle = { ...overlayStyle, 'display': 'block', 'background': SharedStyle.TOOLBAR_COLOR.focus }
|
|
20
|
+
|
|
21
|
+
if (props.active) overlayStyle = { ...overlayStyle, display: 'block' };
|
|
22
|
+
// overlayStyle = { ...overlayStyle, 'display': 'block', 'background': SharedStyle.TOOLBAR_COLOR.active }
|
|
23
|
+
return (
|
|
24
|
+
<S.Main
|
|
25
|
+
{...otherProps}
|
|
26
|
+
onMouseOver={event => this.setState({ hover: true })}
|
|
27
|
+
onMouseOut={event => this.setState({ hover: false })}
|
|
28
|
+
onClick={props.onClick}
|
|
29
|
+
>
|
|
30
|
+
<div>{props.children}</div>
|
|
31
|
+
|
|
32
|
+
<S.Overlay style={{ ...overlayStyle }}>
|
|
33
|
+
<img width="75px" src={props.src} />
|
|
34
|
+
<S.Title>{props.title}</S.Title>
|
|
35
|
+
</S.Overlay>
|
|
36
|
+
{/* {
|
|
37
|
+
state.active ?
|
|
38
|
+
<div style={STYLE_TOOLTIP}>
|
|
39
|
+
<span style={STYLE_TOOLTIP_PIN} />
|
|
40
|
+
{props.tooltip}
|
|
41
|
+
</div>
|
|
42
|
+
: null
|
|
43
|
+
} */}
|
|
44
|
+
</S.Main>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
ToolbarButton.propTypes = {
|
|
50
|
+
title: PropTypes.string,
|
|
51
|
+
hover: PropTypes.bool,
|
|
52
|
+
active: PropTypes.bool.isRequired,
|
|
53
|
+
tooltip: PropTypes.string.isRequired,
|
|
54
|
+
onClick: PropTypes.func
|
|
55
|
+
};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
export const Main = styled.div`
|
|
4
|
+
z-index: 6;
|
|
5
|
+
width: 75px;
|
|
6
|
+
height: 75px;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
font-size: 0px;
|
|
11
|
+
position: relative;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
background: #d3e7e5;
|
|
14
|
+
box-shadow: 3px 1px 3px 0px rgba(0, 0, 0, 0.2),
|
|
15
|
+
-1px -1px 1px 0px rgba(0, 0, 0, 0.14), 0px 2px 1px -1px rgba(0, 0, 0, 0.12);
|
|
16
|
+
`;
|
|
17
|
+
export const rightIcon = styled.div`
|
|
18
|
+
img {
|
|
19
|
+
box-shadow: 3px 1px 3px 0px rgba(0, 0, 0, 0.2),
|
|
20
|
+
-1px -1px 1px 0px rgba(0, 0, 0, 0.14),
|
|
21
|
+
0px 2px 1px -1px rgba(0, 0, 0, 0.12);
|
|
22
|
+
border-radius: 8%;
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
export const Overlay = styled.div`
|
|
26
|
+
position: absolute;
|
|
27
|
+
top: 0px;
|
|
28
|
+
left: 0px;
|
|
29
|
+
bottom: 0px;
|
|
30
|
+
width: 100%;
|
|
31
|
+
text-align: center;
|
|
32
|
+
background: rgba(0, 0, 0, 0.5);
|
|
33
|
+
display: none;
|
|
34
|
+
`;
|
|
35
|
+
export const Title = styled.span`
|
|
36
|
+
position: absolute;
|
|
37
|
+
top: 51%;
|
|
38
|
+
left: 0px;
|
|
39
|
+
width: 100%;
|
|
40
|
+
color: #fff;
|
|
41
|
+
text-transform: uppercase;
|
|
42
|
+
transform: translate(0%, -50%);
|
|
43
|
+
font-size: 11px;
|
|
44
|
+
`;
|
|
45
|
+
export const rMain = styled.div`
|
|
46
|
+
width: 40px;
|
|
47
|
+
display: inline-block;
|
|
48
|
+
align-items: center;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
margin-right: 14px;
|
|
51
|
+
position: relative;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
`;
|
|
54
|
+
export const rOverlay = styled.div`
|
|
55
|
+
position: absolute;
|
|
56
|
+
top: 0px;
|
|
57
|
+
left: 0px;
|
|
58
|
+
bottom: 0px;
|
|
59
|
+
width: 100%;
|
|
60
|
+
text-align: center;
|
|
61
|
+
display: none;
|
|
62
|
+
`;
|
|
63
|
+
export const rTitle = styled.span`
|
|
64
|
+
position: absolute;
|
|
65
|
+
top: 45%;
|
|
66
|
+
left: 1px;
|
|
67
|
+
width: 100%;
|
|
68
|
+
color: #fff;
|
|
69
|
+
text-transform: uppercase;
|
|
70
|
+
transform: translate(0%, -50%);
|
|
71
|
+
|
|
72
|
+
@media screen and (min-width: 1024) {
|
|
73
|
+
font-size: 11px;
|
|
74
|
+
}
|
|
75
|
+
@media screen and (max-width: 1024) {
|
|
76
|
+
font-size: 11px;
|
|
77
|
+
}
|
|
78
|
+
@media screen and (min-width: 1366) {
|
|
79
|
+
font-size: 13px;
|
|
80
|
+
}
|
|
81
|
+
@media screen and (max-width: 1366) {
|
|
82
|
+
font-size: 13px;
|
|
83
|
+
}
|
|
84
|
+
@media screen and (min-width: 1440) {
|
|
85
|
+
font-size: 16px;
|
|
86
|
+
}
|
|
87
|
+
@media screen and (max-width: 1440) {
|
|
88
|
+
font-size: 16px;
|
|
89
|
+
}
|
|
90
|
+
`;
|
|
91
|
+
|
|
92
|
+
export const Toggle = styled.div`
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
position: relative;
|
|
96
|
+
height: 36px;
|
|
97
|
+
margin-left: 20px;
|
|
98
|
+
justify-content: center;
|
|
99
|
+
font-size: 14px;
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
-webkit-user-select: none;
|
|
102
|
+
-moz-user-select: none;
|
|
103
|
+
-ms-user-select: none;
|
|
104
|
+
user-select: none;
|
|
105
|
+
:hover {
|
|
106
|
+
box-shadow: 0px 3px 5px -1px rgba(156, 154, 154, 0.2),
|
|
107
|
+
0px 6px 10px 0px rgba(156, 154, 154, 0.39),
|
|
108
|
+
0px 1px 18px 0px rgba(156, 154, 154, 0.12);
|
|
109
|
+
border-radius: 18px;
|
|
110
|
+
}
|
|
111
|
+
`;
|
|
112
|
+
|
|
113
|
+
export const ToggleIcon = styled.div`
|
|
114
|
+
${'' /* transition-duration: .3s; */}
|
|
115
|
+
position: absolute;
|
|
116
|
+
top: 0px;
|
|
117
|
+
img {
|
|
118
|
+
font-size: 1.4rem;
|
|
119
|
+
box-sizing: border-box;
|
|
120
|
+
border-radius: 50%;
|
|
121
|
+
}
|
|
122
|
+
`;
|
|
123
|
+
|
|
124
|
+
export const ControlTitle = styled.span`
|
|
125
|
+
margin: 10px;
|
|
126
|
+
font-size: 12px;
|
|
127
|
+
`;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormControl, InputLabel, Select, MenuItem } from '@material-ui/core';
|
|
3
|
+
import { makeStyles } from '@material-ui/core/styles';
|
|
4
|
+
|
|
5
|
+
const useStyles = makeStyles({
|
|
6
|
+
selectRoot: {
|
|
7
|
+
display: 'flex',
|
|
8
|
+
alignItems: 'center',
|
|
9
|
+
gap: '0.5rem',
|
|
10
|
+
color: 'rgb(76, 18, 161)',
|
|
11
|
+
fontWeight: 600,
|
|
12
|
+
fontSize: '14px'
|
|
13
|
+
},
|
|
14
|
+
inputLabel: {
|
|
15
|
+
color: 'black'
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const DoorStyleMenu = ({
|
|
20
|
+
selected,
|
|
21
|
+
data,
|
|
22
|
+
onChange,
|
|
23
|
+
getValue,
|
|
24
|
+
placeholder,
|
|
25
|
+
iconStyle
|
|
26
|
+
}) => {
|
|
27
|
+
const classes = useStyles();
|
|
28
|
+
|
|
29
|
+
if (!data || !data.length) return null;
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<FormControl fullWidth variant="outlined">
|
|
33
|
+
{placeholder && (
|
|
34
|
+
<InputLabel className={classes.inputLabel}>{placeholder}</InputLabel>
|
|
35
|
+
)}
|
|
36
|
+
<Select
|
|
37
|
+
value={selected}
|
|
38
|
+
onChange={e => onChange(e.target.value)}
|
|
39
|
+
label={placeholder}
|
|
40
|
+
classes={{ root: classes.selectRoot }}
|
|
41
|
+
renderValue={value => {
|
|
42
|
+
if (!value) {
|
|
43
|
+
return <span style={{ color: 'rgba(86, 95, 119, 1)' }}>Any</span>;
|
|
44
|
+
}
|
|
45
|
+
const selectedItem = data.find(item => getValue(item) === value.name);
|
|
46
|
+
if (!selectedItem)
|
|
47
|
+
return <span style={{ color: 'rgba(86, 95, 119, 1)' }}>Any</span>;
|
|
48
|
+
return (
|
|
49
|
+
<span
|
|
50
|
+
style={{
|
|
51
|
+
display: 'flex',
|
|
52
|
+
alignItems: 'center',
|
|
53
|
+
gap: '0.5rem',
|
|
54
|
+
width: '100%'
|
|
55
|
+
}}
|
|
56
|
+
>
|
|
57
|
+
<span>{selectedItem.name}</span>
|
|
58
|
+
<img
|
|
59
|
+
style={
|
|
60
|
+
iconStyle && {
|
|
61
|
+
...iconStyle
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
height="20"
|
|
65
|
+
src={selectedItem.thumbnail}
|
|
66
|
+
alt=""
|
|
67
|
+
/>
|
|
68
|
+
</span>
|
|
69
|
+
);
|
|
70
|
+
}}
|
|
71
|
+
>
|
|
72
|
+
<MenuItem value={''}>
|
|
73
|
+
<span style={{ color: 'rgba(86, 95, 119, 1)' }}>Any</span>
|
|
74
|
+
</MenuItem>
|
|
75
|
+
{data.map((item, key) => (
|
|
76
|
+
<MenuItem
|
|
77
|
+
classes={{ root: classes.selectRoot }}
|
|
78
|
+
key={key}
|
|
79
|
+
value={getValue(item)}
|
|
80
|
+
>
|
|
81
|
+
<font size="2">{item.name}</font>
|
|
82
|
+
<img
|
|
83
|
+
style={
|
|
84
|
+
iconStyle && {
|
|
85
|
+
...iconStyle
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
height="20"
|
|
89
|
+
src={item.thumbnail}
|
|
90
|
+
alt=""
|
|
91
|
+
/>
|
|
92
|
+
</MenuItem>
|
|
93
|
+
))}
|
|
94
|
+
</Select>
|
|
95
|
+
</FormControl>
|
|
96
|
+
);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
DoorStyleMenu.defaultProps = {
|
|
100
|
+
getValue: it => it.name
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export default DoorStyleMenu;
|