kitchen-simulator 5.0.0-test.18 → 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 -26
- 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 -3
- 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/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/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/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/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,116 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import * as S from '../../styles';
|
|
4
|
+
|
|
5
|
+
import Appliance from '../../product/appliance';
|
|
6
|
+
import {
|
|
7
|
+
API_SERVER,
|
|
8
|
+
MODE_IDLE,
|
|
9
|
+
MODE_3D_VIEW,
|
|
10
|
+
MODE_3D_FIRST_PERSON,
|
|
11
|
+
MODE_VIEWING_CATALOG,
|
|
12
|
+
MODE_CONFIGURING_PROJECT,
|
|
13
|
+
MODE_IDLE_3D,
|
|
14
|
+
MODE_ROTATING_ITEM_3D,
|
|
15
|
+
MODE_DRAGGING_ITEM_3D,
|
|
16
|
+
MODE_2D_PAN,
|
|
17
|
+
MODE_DRAWING_ITEM,
|
|
18
|
+
MODE_DRAWING_ITEM_3D
|
|
19
|
+
} from '../../../../../constants';
|
|
20
|
+
|
|
21
|
+
export const FinishingProduct = ({
|
|
22
|
+
props,
|
|
23
|
+
mode,
|
|
24
|
+
chooseAction,
|
|
25
|
+
dataSource,
|
|
26
|
+
isExpand,
|
|
27
|
+
applyMaterial
|
|
28
|
+
}) => {
|
|
29
|
+
let products = [];
|
|
30
|
+
|
|
31
|
+
if (dataSource.length > 0) {
|
|
32
|
+
for (let i = 0; i < dataSource.length; i++) {
|
|
33
|
+
products.push(
|
|
34
|
+
<S.ItemWrapper key={i.toString()} style={{ justifyContent: 'center' }}>
|
|
35
|
+
<Appliance
|
|
36
|
+
name={'finishing'}
|
|
37
|
+
onClick={() => {
|
|
38
|
+
chooseAction(dataSource[i]);
|
|
39
|
+
props.projectActions.unselectAll();
|
|
40
|
+
if (
|
|
41
|
+
dataSource[i].category === 'lighting' ||
|
|
42
|
+
dataSource[i].category === 'furnishing'
|
|
43
|
+
) {
|
|
44
|
+
props.itemsActions.updatePopupOpen(2);
|
|
45
|
+
if (
|
|
46
|
+
dataSource[i].category === 'lighting' &&
|
|
47
|
+
[
|
|
48
|
+
MODE_IDLE_3D,
|
|
49
|
+
MODE_DRAWING_ITEM_3D,
|
|
50
|
+
MODE_DRAGGING_ITEM_3D,
|
|
51
|
+
MODE_ROTATING_ITEM_3D
|
|
52
|
+
].includes(mode)
|
|
53
|
+
)
|
|
54
|
+
// props.itemsActions.selectToolDrawingItem(dataSource[i].name);
|
|
55
|
+
props.itemsActions.selectToolDrawingItem3D(
|
|
56
|
+
dataSource[i].name
|
|
57
|
+
);
|
|
58
|
+
else {
|
|
59
|
+
[
|
|
60
|
+
MODE_IDLE_3D,
|
|
61
|
+
MODE_DRAWING_ITEM_3D,
|
|
62
|
+
MODE_DRAGGING_ITEM_3D,
|
|
63
|
+
MODE_ROTATING_ITEM_3D
|
|
64
|
+
].includes(mode)
|
|
65
|
+
? props.itemsActions.selectToolDrawingItem3D(
|
|
66
|
+
dataSource[i].name
|
|
67
|
+
)
|
|
68
|
+
: props.itemsActions.selectToolDrawingItem(
|
|
69
|
+
dataSource[i].name
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
props.projectActions.pushLastSelectedCatalogElementToHistory(
|
|
73
|
+
props.catalog.elements[dataSource[i].name]
|
|
74
|
+
);
|
|
75
|
+
if (document.getElementsByClassName('popup-content').length > 0)
|
|
76
|
+
document.getElementsByClassName(
|
|
77
|
+
'popup-content'
|
|
78
|
+
)[0].style.display = 'none';
|
|
79
|
+
}
|
|
80
|
+
}}
|
|
81
|
+
selected={dataSource[i].selected ? dataSource[i].selected : null}
|
|
82
|
+
url={
|
|
83
|
+
dataSource[i].category != undefined &&
|
|
84
|
+
dataSource[i].category !== 'modelling' &&
|
|
85
|
+
dataSource[i].category !== 'floor_style' &&
|
|
86
|
+
dataSource[i].category !== 'lighting' &&
|
|
87
|
+
dataSource[i].category !== 'counter_top' &&
|
|
88
|
+
dataSource[i].category !== 'backsplash' &&
|
|
89
|
+
dataSource[i].category !== 'furnishing'
|
|
90
|
+
? dataSource[i].color
|
|
91
|
+
: dataSource[i].thumbnail
|
|
92
|
+
}
|
|
93
|
+
title={dataSource[i].name}
|
|
94
|
+
category={
|
|
95
|
+
dataSource[i].category !== 'floor_style' ||
|
|
96
|
+
dataSource[i].category !== 'backsplash' ||
|
|
97
|
+
dataSource[i].category !== 'counter_top'
|
|
98
|
+
? ''
|
|
99
|
+
: dataSource[i].category
|
|
100
|
+
}
|
|
101
|
+
/>
|
|
102
|
+
</S.ItemWrapper>
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
let miHeight = 0;
|
|
107
|
+
let nonHeight = 495 - miHeight + 'px';
|
|
108
|
+
let height = window.innerHeight * 0.6 - miHeight + 'px';
|
|
109
|
+
return (
|
|
110
|
+
<S.ProductsContentWrapper
|
|
111
|
+
style={{ width: 220, height: isExpand ? height : nonHeight }}
|
|
112
|
+
>
|
|
113
|
+
{products}
|
|
114
|
+
</S.ProductsContentWrapper>
|
|
115
|
+
);
|
|
116
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as S from './styles';
|
|
3
|
+
import * as PS from '../../styles';
|
|
4
|
+
import { FaTimes } from 'react-icons/fa';
|
|
5
|
+
|
|
6
|
+
class ConfirmPopup extends React.Component {
|
|
7
|
+
constructor(props) {
|
|
8
|
+
super(props);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
_submit() {
|
|
12
|
+
this.props.loadProject();
|
|
13
|
+
this.closePanel();
|
|
14
|
+
}
|
|
15
|
+
closePanel() {
|
|
16
|
+
this.props.handleConfirmLoad(false);
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
let { visible } = this.props;
|
|
20
|
+
return (
|
|
21
|
+
<div
|
|
22
|
+
style={{
|
|
23
|
+
width: '100%',
|
|
24
|
+
height: '100%',
|
|
25
|
+
display: visible ? 'block' : 'none',
|
|
26
|
+
userSelect: 'none'
|
|
27
|
+
}}
|
|
28
|
+
>
|
|
29
|
+
<S.Div>
|
|
30
|
+
<div
|
|
31
|
+
style={{
|
|
32
|
+
backgroundColor: '#1183B7',
|
|
33
|
+
height: '30px',
|
|
34
|
+
paddingRight: '6px'
|
|
35
|
+
}}
|
|
36
|
+
>
|
|
37
|
+
<div
|
|
38
|
+
style={{ float: 'right', marginTop: '4px' }}
|
|
39
|
+
onClick={() => this.closePanel()}
|
|
40
|
+
>
|
|
41
|
+
<PS.IconButton>
|
|
42
|
+
<FaTimes />
|
|
43
|
+
</PS.IconButton>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div style={{ fontSize: 14, marginTop: 20, marginLeft: 40 }}>
|
|
47
|
+
All items will be removed from the canvas.
|
|
48
|
+
<br />
|
|
49
|
+
Are you sure?
|
|
50
|
+
</div>
|
|
51
|
+
<div
|
|
52
|
+
style={{
|
|
53
|
+
fontSize: 12,
|
|
54
|
+
display: 'flex',
|
|
55
|
+
flexDirection: 'column',
|
|
56
|
+
position: 'relative'
|
|
57
|
+
}}
|
|
58
|
+
></div>
|
|
59
|
+
<div style={{ display: 'flex', position: 'relative' }}>
|
|
60
|
+
<div
|
|
61
|
+
style={{
|
|
62
|
+
width: '70px',
|
|
63
|
+
marginLeft: '90px',
|
|
64
|
+
marginTop: '15px',
|
|
65
|
+
cursor: 'pointer'
|
|
66
|
+
}}
|
|
67
|
+
onClick={() => {
|
|
68
|
+
this._submit() || this.props.closeAction();
|
|
69
|
+
}}
|
|
70
|
+
>
|
|
71
|
+
<img
|
|
72
|
+
width={'80px'}
|
|
73
|
+
style={{ float: 'right' }}
|
|
74
|
+
src={'/assets/img/svg/toolbar/use_button.svg'}
|
|
75
|
+
/>
|
|
76
|
+
<S.ButtonTitle1>{'Yes'}</S.ButtonTitle1>
|
|
77
|
+
</div>
|
|
78
|
+
<div
|
|
79
|
+
style={{
|
|
80
|
+
width: '70px',
|
|
81
|
+
marginLeft: '40px',
|
|
82
|
+
marginTop: '15px',
|
|
83
|
+
cursor: 'pointer'
|
|
84
|
+
}}
|
|
85
|
+
onClick={() => this.closePanel()}
|
|
86
|
+
>
|
|
87
|
+
<img
|
|
88
|
+
width={'80px'}
|
|
89
|
+
style={{ float: 'right' }}
|
|
90
|
+
src={'/assets/img/svg/toolbar/cancel_button.svg'}
|
|
91
|
+
/>
|
|
92
|
+
<S.ButtonTitle2>{'No'}</S.ButtonTitle2>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
</S.Div>
|
|
96
|
+
</div>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export default ConfirmPopup;
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import * as S from '../../styles';
|
|
3
|
+
import * as MS from './styles';
|
|
4
|
+
import FloorProduct from '../../product/floorproduct';
|
|
5
|
+
import * as rectangleData from './rectangle.json';
|
|
6
|
+
import * as lShaped from './lShaped.json';
|
|
7
|
+
import * as oRectangle from './oRectangle.json';
|
|
8
|
+
import * as longNarrow from './longNarrow.json';
|
|
9
|
+
import ConfirmPopup from './confirm-popup';
|
|
10
|
+
import { ARRAY_3D_MODES } from '../../../../../constants';
|
|
11
|
+
|
|
12
|
+
export const FloorChooseProduct = ({
|
|
13
|
+
drawAction,
|
|
14
|
+
props,
|
|
15
|
+
dataSource,
|
|
16
|
+
isExpand,
|
|
17
|
+
closeAction,
|
|
18
|
+
mode
|
|
19
|
+
}) => {
|
|
20
|
+
let [isPopupOpen, setPopupOpen] = useState(false);
|
|
21
|
+
let [selectedProject, setSelectedProject] = useState();
|
|
22
|
+
|
|
23
|
+
let miHeight = 0;
|
|
24
|
+
let nonHeight = 495 - miHeight + 'px';
|
|
25
|
+
let height = window.innerHeight * 0.6 - miHeight + 'px';
|
|
26
|
+
let select = element => {
|
|
27
|
+
switch (element.prototype) {
|
|
28
|
+
case 'lines':
|
|
29
|
+
props.linesActions.selectToolDrawingLine(element.name);
|
|
30
|
+
break;
|
|
31
|
+
case 'items':
|
|
32
|
+
ARRAY_3D_MODES.includes(mode)
|
|
33
|
+
? props.itemsActions.selectToolDrawingItem3D(element.name)
|
|
34
|
+
: props.itemsActions.selectToolDrawingItem(element.name);
|
|
35
|
+
break;
|
|
36
|
+
case 'holes':
|
|
37
|
+
ARRAY_3D_MODES.includes(mode)
|
|
38
|
+
? props.holesActions.selectToolDrawingHole3D(element.name)
|
|
39
|
+
: props.holesActions.selectToolDrawingHole(element.name);
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
props.holesActions.updatePopupOpen(4);
|
|
43
|
+
props.projectActions.pushLastSelectedCatalogElementToHistory(element);
|
|
44
|
+
closeAction && closeAction();
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
let isProjectEmpty = scene => {
|
|
48
|
+
let { layers, selectedLayer } = scene;
|
|
49
|
+
let layer = layers.get(selectedLayer);
|
|
50
|
+
return (
|
|
51
|
+
layer.areas.size +
|
|
52
|
+
layer.lines.size +
|
|
53
|
+
layer.holes.size +
|
|
54
|
+
layer.items.size ===
|
|
55
|
+
0
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
let loadProjectFromData = data => event => {
|
|
60
|
+
event.preventDefault();
|
|
61
|
+
|
|
62
|
+
if (isProjectEmpty(props.state.scene)) {
|
|
63
|
+
loadProject(data);
|
|
64
|
+
closeAction && closeAction();
|
|
65
|
+
} else {
|
|
66
|
+
setSelectedProject(data);
|
|
67
|
+
setPopupOpen(true);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
let loadProjectFromRetangleLineFile = loadProjectFromData(rectangleData);
|
|
72
|
+
|
|
73
|
+
let loadProjectFromlShapedLineFile = loadProjectFromData(lShaped);
|
|
74
|
+
|
|
75
|
+
let loadProjectFromoRectangleLineFile = loadProjectFromData(oRectangle);
|
|
76
|
+
|
|
77
|
+
let loadProjectFromlongNarrowLineFile = loadProjectFromData(longNarrow);
|
|
78
|
+
|
|
79
|
+
let handleConfirmLoad = value => {
|
|
80
|
+
setPopupOpen(value);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
let loadProject = data => {
|
|
84
|
+
props.projectActions.loadProject(data || selectedProject);
|
|
85
|
+
document.getElementsByClassName('popup-content')[0].style.display = 'none';
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
let result = <div></div>;
|
|
89
|
+
//Drawer Custom Floor
|
|
90
|
+
if (dataSource === -1) {
|
|
91
|
+
result = (
|
|
92
|
+
<section>
|
|
93
|
+
<div style={{ padding: '12px 20px', fontSize: 11 }}>
|
|
94
|
+
<p style={{ color: '#e2e2e2' }}>
|
|
95
|
+
Using your mouse and the{' '}
|
|
96
|
+
<span style={{ color: 'white' }}>
|
|
97
|
+
<strong>Object Properties</strong>
|
|
98
|
+
</span>{' '}
|
|
99
|
+
Window you can draw your custom space to meet your exact project
|
|
100
|
+
requirements.
|
|
101
|
+
</p>
|
|
102
|
+
<p style={{ color: '#e2e2e2' }}>
|
|
103
|
+
To get professional help, click on the{' '}
|
|
104
|
+
<span style={{ color: 'white' }}>
|
|
105
|
+
<strong>Designer Assistance</strong>
|
|
106
|
+
</span>{' '}
|
|
107
|
+
button
|
|
108
|
+
</p>
|
|
109
|
+
</div>
|
|
110
|
+
<MS.Control
|
|
111
|
+
onClick={() => {
|
|
112
|
+
if (document.getElementsByClassName('popup-content').length > 0)
|
|
113
|
+
document.getElementsByClassName(
|
|
114
|
+
'popup-content'
|
|
115
|
+
)[0].style.display = 'none';
|
|
116
|
+
drawAction();
|
|
117
|
+
}}
|
|
118
|
+
>
|
|
119
|
+
<MS.ControlIcon>
|
|
120
|
+
<img
|
|
121
|
+
width={'160px'}
|
|
122
|
+
src={'/assets/img/svg/toolbar/get_started_button.svg'}
|
|
123
|
+
/>
|
|
124
|
+
<S.ButtonTitle style={{ fontSize: 13 }}>
|
|
125
|
+
{' '}
|
|
126
|
+
Get Started{' '}
|
|
127
|
+
</S.ButtonTitle>
|
|
128
|
+
</MS.ControlIcon>
|
|
129
|
+
</MS.Control>
|
|
130
|
+
</section>
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
// Predefined Room Layout
|
|
134
|
+
else if (dataSource === -2) {
|
|
135
|
+
result = (
|
|
136
|
+
<section>
|
|
137
|
+
<ConfirmPopup
|
|
138
|
+
visible={isPopupOpen}
|
|
139
|
+
closeAction={closeAction && closeAction}
|
|
140
|
+
handleConfirmLoad={handleConfirmLoad}
|
|
141
|
+
loadProject={loadProject}
|
|
142
|
+
/>
|
|
143
|
+
<S.ProductsRow
|
|
144
|
+
style={{ width: '100%', justifyContent: 'space-between' }}
|
|
145
|
+
>
|
|
146
|
+
<section
|
|
147
|
+
style={{
|
|
148
|
+
display: 'flex',
|
|
149
|
+
justifyContent: 'space-evenly',
|
|
150
|
+
borderBottom: '2px solid #2f2f2fb3',
|
|
151
|
+
width: '100%',
|
|
152
|
+
backgroundColor: '#3e3e3f'
|
|
153
|
+
}}
|
|
154
|
+
>
|
|
155
|
+
<MS.LineWrapper
|
|
156
|
+
onClick={loadProjectFromRetangleLineFile}
|
|
157
|
+
style={{ padding: '12px 11px 8px' }}
|
|
158
|
+
>
|
|
159
|
+
<div style={{ width: '50px', display: 'grid' }}>
|
|
160
|
+
<img
|
|
161
|
+
width={40}
|
|
162
|
+
src={'/assets/img/svg/toolbar/predefined_room_rectangle.svg'}
|
|
163
|
+
/>
|
|
164
|
+
<span style={{ marginTop: '7px', marginBottom: '9px' }}>
|
|
165
|
+
Square
|
|
166
|
+
</span>
|
|
167
|
+
</div>
|
|
168
|
+
</MS.LineWrapper>
|
|
169
|
+
<MS.LineWrapper
|
|
170
|
+
onClick={loadProjectFromlShapedLineFile}
|
|
171
|
+
style={{ padding: '12px 11px 8px' }}
|
|
172
|
+
>
|
|
173
|
+
<div style={{ width: '50px', display: 'grid' }}>
|
|
174
|
+
<img
|
|
175
|
+
width={40}
|
|
176
|
+
src={'/assets/img/svg/toolbar/predefined_room_l_shaped.svg'}
|
|
177
|
+
/>
|
|
178
|
+
<span style={{ marginTop: '7px', marginBottom: '9px' }}>
|
|
179
|
+
L Shaped
|
|
180
|
+
</span>
|
|
181
|
+
</div>
|
|
182
|
+
</MS.LineWrapper>
|
|
183
|
+
</section>
|
|
184
|
+
<section
|
|
185
|
+
style={{
|
|
186
|
+
display: 'flex',
|
|
187
|
+
justifyContent: 'space-evenly',
|
|
188
|
+
borderBottom: '2px solid #2f2f2fb3',
|
|
189
|
+
width: '100%',
|
|
190
|
+
backgroundColor: '#3e3e3f'
|
|
191
|
+
}}
|
|
192
|
+
>
|
|
193
|
+
<MS.LineWrapper
|
|
194
|
+
onClick={loadProjectFromoRectangleLineFile}
|
|
195
|
+
style={{ padding: '12px 11px 8px' }}
|
|
196
|
+
>
|
|
197
|
+
<div style={{ width: '50px', display: 'grid' }}>
|
|
198
|
+
<img
|
|
199
|
+
width={40}
|
|
200
|
+
src={
|
|
201
|
+
'/assets/img/svg/toolbar/predefined_room_open_rectangle_2.svg'
|
|
202
|
+
}
|
|
203
|
+
/>
|
|
204
|
+
<span style={{ marginTop: '7px', marginBottom: '9px' }}>
|
|
205
|
+
Open Square
|
|
206
|
+
</span>
|
|
207
|
+
</div>
|
|
208
|
+
</MS.LineWrapper>
|
|
209
|
+
<MS.LineWrapper
|
|
210
|
+
onClick={loadProjectFromlongNarrowLineFile}
|
|
211
|
+
style={{ padding: '12px 11px 8px' }}
|
|
212
|
+
>
|
|
213
|
+
<div style={{ width: '50px', display: 'grid' }}>
|
|
214
|
+
<img
|
|
215
|
+
width={40}
|
|
216
|
+
height={40}
|
|
217
|
+
src={
|
|
218
|
+
'/assets/img/svg/toolbar/predefined_room_long_narrow.svg'
|
|
219
|
+
}
|
|
220
|
+
/>
|
|
221
|
+
<span style={{ marginTop: '7px', marginBottom: '9px' }}>
|
|
222
|
+
Long & Narrow
|
|
223
|
+
</span>
|
|
224
|
+
</div>
|
|
225
|
+
</MS.LineWrapper>
|
|
226
|
+
</section>
|
|
227
|
+
</S.ProductsRow>
|
|
228
|
+
</section>
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
//Room Elements
|
|
232
|
+
else {
|
|
233
|
+
result = [];
|
|
234
|
+
dataSource.forEach((el, key) => {
|
|
235
|
+
result.push(
|
|
236
|
+
<S.ItemWrapper key={el.name} style={{ justifyContent: 'center' }}>
|
|
237
|
+
<FloorProduct
|
|
238
|
+
url={el.info.image}
|
|
239
|
+
title={el.info.title}
|
|
240
|
+
onClick={() => select(el)}
|
|
241
|
+
/>
|
|
242
|
+
</S.ItemWrapper>
|
|
243
|
+
);
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
return (
|
|
248
|
+
<S.ProductsContentWrapper
|
|
249
|
+
style={{ width: 250, height: isExpand ? height : nonHeight }}
|
|
250
|
+
>
|
|
251
|
+
{result}
|
|
252
|
+
</S.ProductsContentWrapper>
|
|
253
|
+
);
|
|
254
|
+
};
|