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.
Files changed (179) hide show
  1. package/package.json +8 -26
  2. package/src/@history.js +3 -0
  3. package/src/CrossSignOn.jsx +94 -0
  4. package/src/KitchenConfigurator.jsx +1526 -0
  5. package/src/KitchenConfiguratorApp.jsx +1 -1
  6. package/src/_KitchenConfigurator.jsx +3 -3
  7. package/src/components/catalog-view/catalog-breadcrumb.jsx +53 -0
  8. package/src/components/catalog-view/catalog-item.jsx +229 -0
  9. package/src/components/catalog-view/catalog-list.jsx +173 -0
  10. package/src/components/catalog-view/catalog-page-item.jsx +110 -0
  11. package/src/components/catalog-view/catalog-turn-back-page-item.jsx +80 -0
  12. package/src/components/configurator/custom-configurator.jsx +77 -0
  13. package/src/components/configurator/project-configurator.jsx +120 -0
  14. package/src/components/export.js +36 -0
  15. package/src/components/firstsetting/button/styles.js +223 -0
  16. package/src/components/firstsetting/export.js +9 -0
  17. package/src/components/firstsetting/firstsetting-content-button.jsx +198 -0
  18. package/src/components/firstsetting/firstsetting-toggle-button.jsx +101 -0
  19. package/src/components/firstsetting/firstsetting.jsx +814 -0
  20. package/src/components/footerbar/button/ControlButton.jsx +43 -0
  21. package/src/components/footerbar/button/DirectionButton.jsx +54 -0
  22. package/src/components/footerbar/button/DirectionPanSpinButton.jsx +36 -0
  23. package/src/components/footerbar/button/ToggleButton.jsx +58 -0
  24. package/src/components/footerbar/button/ToggleConvertButton.jsx +48 -0
  25. package/src/components/footerbar/button/ToggleMeasureButton.jsx +33 -0
  26. package/src/components/footerbar/button/styles.js +217 -0
  27. package/src/components/footerbar/export.js +9 -0
  28. package/src/components/footerbar/footer-content-button.jsx +198 -0
  29. package/src/components/footerbar/footer-toggle-button.jsx +101 -0
  30. package/src/components/footerbar/footerbar.jsx +1103 -0
  31. package/src/components/footerbar/styles.js +263 -0
  32. package/src/components/header/button/MenuButton.jsx +46 -0
  33. package/src/components/header/button/SaveButton.jsx +54 -0
  34. package/src/components/header/button/styles.js +181 -0
  35. package/src/components/header/export.js +5 -0
  36. package/src/components/header/header.jsx +631 -0
  37. package/src/components/header/header.style.css +47 -0
  38. package/src/components/header/styles.js +320 -0
  39. package/src/components/login/Login.js +77 -0
  40. package/src/components/login/LoginForm/index.js +108 -0
  41. package/src/components/login/Register.js +82 -0
  42. package/src/components/login/RegisterForm/index.js +171 -0
  43. package/src/components/login/jwtService.js +201 -0
  44. package/src/components/login/style.css +158 -0
  45. package/src/components/login/style.scss +260 -0
  46. package/src/components/myprojects/export.js +5 -0
  47. package/src/components/myprojects/index.jsx +445 -0
  48. package/src/components/myprojects/styles.js +241 -0
  49. package/src/components/sidebar/custom-accordion.jsx +48 -0
  50. package/src/components/sidebar/export.js +15 -0
  51. package/src/components/sidebar/panel-element-editor/attributes-editor/attributes-editor.jsx +73 -0
  52. package/src/components/sidebar/panel-element-editor/attributes-editor/confirm-popup.jsx +101 -0
  53. package/src/components/sidebar/panel-element-editor/attributes-editor/hole-attributes-editor.jsx +149 -0
  54. package/src/components/sidebar/panel-element-editor/attributes-editor/item-attributes-editor.jsx +316 -0
  55. package/src/components/sidebar/panel-element-editor/attributes-editor/line-attributes-editor.jsx +108 -0
  56. package/src/components/sidebar/panel-element-editor/element-editor.jsx +1070 -0
  57. package/src/components/sidebar/panel-element-editor/multi-elements-editor.jsx +0 -0
  58. package/src/components/sidebar/panel-element-editor/panel-element-editor.jsx +104 -0
  59. package/src/components/sidebar/panel-element-editor/panel-multi-elements-editor.jsx +155 -0
  60. package/src/components/sidebar/panel-group-editor.jsx +272 -0
  61. package/src/components/sidebar/panel-groups.jsx +310 -0
  62. package/src/components/sidebar/panel-guides.jsx +192 -0
  63. package/src/components/sidebar/panel-layer-elements.jsx +298 -0
  64. package/src/components/sidebar/panel-layers.jsx +381 -0
  65. package/src/components/sidebar/panel.jsx +71 -0
  66. package/src/components/sidebar/sidebar.jsx +106 -0
  67. package/src/components/sidebar/toolbar-panel.jsx +139 -0
  68. package/src/components/sign/export.js +7 -0
  69. package/src/components/sign/main/index.jsx +523 -0
  70. package/src/components/sign/main/styles.js +163 -0
  71. package/src/components/toolbar/button/ControlButton.jsx +41 -0
  72. package/src/components/toolbar/button/DirectionButton.jsx +34 -0
  73. package/src/components/toolbar/button/RightButton.jsx +103 -0
  74. package/src/components/toolbar/button/ToggleButton.jsx +41 -0
  75. package/src/components/toolbar/button/index.jsx +55 -0
  76. package/src/components/toolbar/button/styles.js +127 -0
  77. package/src/components/toolbar/components/DoorStyleMenu.jsx +103 -0
  78. package/src/components/toolbar/components/Pricing.jsx +126 -0
  79. package/src/components/toolbar/components/ReviewForQuote.jsx +635 -0
  80. package/src/components/toolbar/export.js +21 -0
  81. package/src/components/toolbar/main/Alert.js +122 -0
  82. package/src/components/toolbar/main/TakePictureModal.jsx +104 -0
  83. package/src/components/toolbar/main/confirm-popup.jsx +99 -0
  84. package/src/components/toolbar/main/index.jsx +5627 -0
  85. package/src/components/toolbar/main/lShaped.json +311 -0
  86. package/src/components/toolbar/main/longNarrow.json +238 -0
  87. package/src/components/toolbar/main/myComponents.js +123 -0
  88. package/src/components/toolbar/main/oRectangle.json +220 -0
  89. package/src/components/toolbar/main/rectangle.json +238 -0
  90. package/src/components/toolbar/main/style.css +107 -0
  91. package/src/components/toolbar/main/styles.js +696 -0
  92. package/src/components/toolbar/plugin-item.jsx +123 -0
  93. package/src/components/toolbar/popup/appliance/appliance-category/index.jsx +73 -0
  94. package/src/components/toolbar/popup/appliance/choose-appliance/index.jsx +102 -0
  95. package/src/components/toolbar/popup/appliance/index.jsx +83 -0
  96. package/src/components/toolbar/popup/autosaveprompt/index.jsx +150 -0
  97. package/src/components/toolbar/popup/autosaveprompt/styles.css +64 -0
  98. package/src/components/toolbar/popup/autosaveprompt/styles.js +40 -0
  99. package/src/components/toolbar/popup/cabinet/cabinet-category/index.jsx +73 -0
  100. package/src/components/toolbar/popup/cabinet/choose-product/index.jsx +119 -0
  101. package/src/components/toolbar/popup/cabinet/index.jsx +85 -0
  102. package/src/components/toolbar/popup/doorStyle/choose-style/index.jsx +63 -0
  103. package/src/components/toolbar/popup/doorStyle/index.jsx +71 -0
  104. package/src/components/toolbar/popup/doorStyle/style-category/index.jsx +139 -0
  105. package/src/components/toolbar/popup/downloadsummary/downloadSummaryContext.js +2 -0
  106. package/src/components/toolbar/popup/downloadsummary/downloadSummaryTemp.jsx +157 -0
  107. package/src/components/toolbar/popup/downloadsummary/index.jsx +643 -0
  108. package/src/components/toolbar/popup/downloadsummary/show2D/show2DView.jsx +51 -0
  109. package/src/components/toolbar/popup/downloadsummary/show2D/viewer2DDownLoad.jsx +175 -0
  110. package/src/components/toolbar/popup/downloadsummary/show3D/show3DView.jsx +283 -0
  111. package/src/components/toolbar/popup/downloadsummary/show3D/viewer3DDownLoad.jsx +2257 -0
  112. package/src/components/toolbar/popup/downloadsummary/showCabinetInfo.js +93 -0
  113. package/src/components/toolbar/popup/downloadsummary/showElevation/showElevationView.jsx +132 -0
  114. package/src/components/toolbar/popup/downloadsummary/showElevation/viewer3DElevationDownload.jsx +2198 -0
  115. package/src/components/toolbar/popup/downloadsummary/showElevation/viewerElevationDownload.jsx +152 -0
  116. package/src/components/toolbar/popup/downloadsummary/showWarranty.jsx +149 -0
  117. package/src/components/toolbar/popup/downloadsummary/styles.css +177 -0
  118. package/src/components/toolbar/popup/downloadsummary/styles.js +453 -0
  119. package/src/components/toolbar/popup/finishingtouch/category/index.jsx +34 -0
  120. package/src/components/toolbar/popup/finishingtouch/index.jsx +58 -0
  121. package/src/components/toolbar/popup/finishingtouch/material-edit.jsx +112 -0
  122. package/src/components/toolbar/popup/finishingtouch/product/index.jsx +116 -0
  123. package/src/components/toolbar/popup/floorplan/choose-floor/confirm-popup.jsx +101 -0
  124. package/src/components/toolbar/popup/floorplan/choose-floor/index.jsx +254 -0
  125. package/src/components/toolbar/popup/floorplan/choose-floor/lShaped.json +311 -0
  126. package/src/components/toolbar/popup/floorplan/choose-floor/longNarrow.json +238 -0
  127. package/src/components/toolbar/popup/floorplan/choose-floor/oRectangle.json +220 -0
  128. package/src/components/toolbar/popup/floorplan/choose-floor/rectangle.json +238 -0
  129. package/src/components/toolbar/popup/floorplan/choose-floor/styles.js +86 -0
  130. package/src/components/toolbar/popup/floorplan/floor-category/index.jsx +109 -0
  131. package/src/components/toolbar/popup/floorplan/index.jsx +60 -0
  132. package/src/components/toolbar/popup/index.jsx +241 -0
  133. package/src/components/toolbar/popup/newproject/index.jsx +59 -0
  134. package/src/components/toolbar/popup/newproject/styles.css +64 -0
  135. package/src/components/toolbar/popup/newproject/styles.js +41 -0
  136. package/src/components/toolbar/popup/product/appliance.jsx +54 -0
  137. package/src/components/toolbar/popup/product/cabinetproduct.jsx +15 -0
  138. package/src/components/toolbar/popup/product/doorstyle.jsx +58 -0
  139. package/src/components/toolbar/popup/product/doorstyleproduct.jsx +47 -0
  140. package/src/components/toolbar/popup/product/floor.jsx +36 -0
  141. package/src/components/toolbar/popup/product/floorproduct.jsx +42 -0
  142. package/src/components/toolbar/popup/product/index.jsx +36 -0
  143. package/src/components/toolbar/popup/product/primary.jsx +77 -0
  144. package/src/components/toolbar/popup/product/productline.jsx +93 -0
  145. package/src/components/toolbar/popup/product/reviewItem.jsx +427 -0
  146. package/src/components/toolbar/popup/product/reviewMolding.jsx +310 -0
  147. package/src/components/toolbar/popup/product/style.css +54 -0
  148. package/src/components/toolbar/popup/product/styles.js +260 -0
  149. package/src/components/toolbar/popup/savedesign/FullPictureForm.jsx +146 -0
  150. package/src/components/toolbar/popup/savedesign/index.jsx +495 -0
  151. package/src/components/toolbar/popup/savedesign/savedesign.style.css +16 -0
  152. package/src/components/toolbar/popup/savedesign/styles.js +151 -0
  153. package/src/components/toolbar/popup/setDoorStyleOption/index.jsx +87 -0
  154. package/src/components/toolbar/popup/styles.js +909 -0
  155. package/src/components/toolbar/popup/submitforquote/AddToCartOptions.jsx +192 -0
  156. package/src/components/toolbar/popup/submitforquote/CustomerRequestsForm.jsx +96 -0
  157. package/src/components/toolbar/popup/submitforquote/SkipDesignerReview.jsx +54 -0
  158. package/src/components/toolbar/popup/submitforquote/StepDots.jsx +25 -0
  159. package/src/components/toolbar/popup/submitforquote/cart-choice.jsx +116 -0
  160. package/src/components/toolbar/popup/submitforquote/doorstyle-menus.js +38 -0
  161. package/src/components/toolbar/popup/submitforquote/index.jsx +698 -0
  162. package/src/components/toolbar/popup/submitforquote/styles.css +105 -0
  163. package/src/components/toolbar/popup/submitforquote/styles.js +294 -0
  164. package/src/components/toolbar/popup/submitprompt/index.jsx +89 -0
  165. package/src/components/toolbar/popup/submitprompt/styles.css +64 -0
  166. package/src/components/toolbar/popup/submitprompt/styles.js +42 -0
  167. package/src/components/toolbar/toolbar-button.jsx +90 -0
  168. package/src/components/toolbar/toolbar-load-button.jsx +36 -0
  169. package/src/components/toolbar/toolbar-save-button.jsx +32 -0
  170. package/src/components/wizardstep/button/styles.js +677 -0
  171. package/src/components/wizardstep/export.js +5 -0
  172. package/src/components/wizardstep/index.jsx +1372 -0
  173. package/src/components/wizardstep/styles.js +688 -0
  174. package/src/components/wizardstep/wizardstep-content-button.jsx +198 -0
  175. package/src/components/wizardstep/wizardstep-toggle-button.jsx +101 -0
  176. package/src/{_index.js → index.js} +4 -4
  177. package/src/renderer.jsx +466 -0
  178. package/src/actions/_export.js +0 -35
  179. package/src/components/_export.js +0 -11
@@ -0,0 +1,241 @@
1
+ import {
2
+ BG_COLOR_0,
3
+ BG_COLOR_HOVER,
4
+ DEFAULT_FONT_FAMILY,
5
+ SECONDARY_PURPLE_COLOR,
6
+ TEXT_COLOR_NEUTRAL_0,
7
+ TEXT_COLOR_NEUTRAL_1,
8
+ TEXT_COLOR_NEUTRAL_2,
9
+ TEXT_COLOR_NEUTRAL_3
10
+ } from '../../constants';
11
+ import styled from 'styled-components';
12
+ import MyProjects from './index';
13
+
14
+ export const DialogWrapper = styled.div`
15
+ position: absolute;
16
+ left: 0;
17
+ top: 60px;
18
+ width: 100%;
19
+ height: calc(100% - 60px);
20
+ display: flex;
21
+ `;
22
+
23
+ export const Dialog = styled.div`
24
+ position: relative;
25
+ margin: auto;
26
+ width: 600px;
27
+ display: flex;
28
+ flex-direction: column;
29
+ padding: 30px;
30
+ user-select: none;
31
+ text-align: center;
32
+ border-radius: 10px;
33
+ z-index: 10;
34
+ background-color: rgb(255, 255, 255);
35
+ box-shadow: 0px 3px 5px -1px rgba(156, 154, 154, 0.2),
36
+ 0px 6px 10px 0px rgba(156, 154, 154, 0.39),
37
+ 0px 1px 18px 0px rgba(156, 154, 154, 0.12);
38
+ `;
39
+
40
+ export const DialogTitle = styled.span`
41
+ color: ${TEXT_COLOR_NEUTRAL_1};
42
+ font-family: ${DEFAULT_FONT_FAMILY};
43
+ font-size: 22px;
44
+ font-weight: 700;
45
+ line-height: 30px;
46
+ text-align: left;
47
+ `;
48
+
49
+ export const DialogContent = styled.span`
50
+ font-family: ${DEFAULT_FONT_FAMILY};
51
+ color: ${TEXT_COLOR_NEUTRAL_1};
52
+ padding: 10px 0px;
53
+ font-size: 13px;
54
+ font-weight: 400;
55
+ line-height: 18px;
56
+ text-align: left;
57
+ width: 100%;
58
+ `;
59
+
60
+ export const DialogContentSelection = styled.div`
61
+ display: flex;
62
+ flex-direction: column;
63
+ padding: 10px 0px;
64
+ max-height: calc(100vh - 300px);
65
+ overflow-y: scroll;
66
+ `;
67
+
68
+ export const DialogContents = styled.span`
69
+ font-family: ${DEFAULT_FONT_FAMILY};
70
+ color: ${TEXT_COLOR_NEUTRAL_1};
71
+ padding: 10px 0px;
72
+
73
+ @media screen and (min-width: 1024) {
74
+ font-size: 11px;
75
+ }
76
+ @media screen and (max-width: 1024) {
77
+ font-size: 11px;
78
+ }
79
+ @media screen and (min-width: 1366) {
80
+ font-size: 13px;
81
+ }
82
+ @media screen and (max-width: 1366) {
83
+ font-size: 13px;
84
+ }
85
+ @media screen and (min-width: 1440) {
86
+ font-size: 16px;
87
+ }
88
+ @media screen and (max-width: 1440) {
89
+ font-size: 16px;
90
+ }
91
+ font-weight: 400;
92
+ line-height: 18px;
93
+ text-align: left;
94
+ `;
95
+
96
+ export const SelectWrapper = styled.div`
97
+ position: relative;
98
+ display: flex;
99
+ align-items: center;
100
+ margin-left: 10px;
101
+ `;
102
+
103
+ export const Select = styled.div`
104
+ border-bottom: 2px solid ${TEXT_COLOR_NEUTRAL_1};
105
+ width: 150px;
106
+ text-align: left;
107
+ font-family: ${DEFAULT_FONT_FAMILY};
108
+ color: ${TEXT_COLOR_NEUTRAL_1};
109
+ cursor: pointer;
110
+ :hover {
111
+ border-bottom-color: ${SECONDARY_PURPLE_COLOR};
112
+ }
113
+ `;
114
+
115
+ export const ArrowIcon = styled.img`
116
+ position: absolute;
117
+ width: 15px;
118
+ height: 9px;
119
+ background-color: ${TEXT_COLOR_NEUTRAL_3};
120
+ top: 10px;
121
+ right: 10px;
122
+ -webkit-mask-image: url(${props => props.maskImage});
123
+ -webkit-mask-size: 100% 100%;
124
+ -webkit-mask-repeat: no-repeat;
125
+ `;
126
+
127
+ export const SelectOption = styled.span`
128
+ font-size: 13px;
129
+ padding: 12px 20px;
130
+ font-family: ${DEFAULT_FONT_FAMILY};
131
+ color: ${TEXT_COLOR_NEUTRAL_0};
132
+ font-weight: 600;
133
+ text-align: left;
134
+ cursor: pointer;
135
+ :hover {
136
+ background-color: ${BG_COLOR_HOVER};
137
+ }
138
+ `;
139
+
140
+ export const SearchInput = styled.input`
141
+ outline: 0;
142
+ border: 2px solid ${TEXT_COLOR_NEUTRAL_3};
143
+ height: 35px;
144
+ padding: 5px;
145
+ padding-left: 35px;
146
+ border-radius: 7px;
147
+ `;
148
+
149
+ export const MyProjectsTable = styled.div`
150
+ display: flex;
151
+ flex-direction: column;
152
+ `;
153
+
154
+ export const MyProjectsThead = styled.div`
155
+ background-color: ${BG_COLOR_0};
156
+ display: flex;
157
+ align-items: center;
158
+ background-color: #fafaff;
159
+ `;
160
+
161
+ export const MyProjectsTh = styled.div`
162
+ font-family: ${DEFAULT_FONT_FAMILY};
163
+
164
+ @media screen and (min-width: 1024) {
165
+ font-size: 11px;
166
+ }
167
+ @media screen and (max-width: 1024) {
168
+ font-size: 11px;
169
+ }
170
+ @media screen and (min-width: 1366) {
171
+ font-size: 13px;
172
+ }
173
+ @media screen and (max-width: 1366) {
174
+ font-size: 13px;
175
+ }
176
+ @media screen and (min-width: 1440) {
177
+ font-size: 16px;
178
+ }
179
+ @media screen and (max-width: 1440) {
180
+ font-size: 16px;
181
+ }
182
+ line-height: 13px;
183
+ text-align: left;
184
+ font-weight: 600;
185
+ margin: 5px;
186
+ line-height: normal;
187
+ color: ${TEXT_COLOR_NEUTRAL_2};
188
+ `;
189
+
190
+ export const ActionButton = styled.div`
191
+ border-radius: 5px;
192
+ cursor: pointer;
193
+ display: flex;
194
+ align-items: center;
195
+ color: ${SECONDARY_PURPLE_COLOR};
196
+ width: 35px;
197
+ height: 35px;
198
+ padding: 10px;
199
+ :hover {
200
+ background-color: ${BG_COLOR_HOVER};
201
+ }
202
+ `;
203
+
204
+ export const TileItem = styled.div`
205
+ width: 150px;
206
+ display: flex;
207
+ flex-direction: column;
208
+ font-family: ${DEFAULT_FONT_FAMILY};
209
+
210
+ @media screen and (min-width: 1024) {
211
+ font-size: 11px;
212
+ }
213
+ @media screen and (max-width: 1024) {
214
+ font-size: 11px;
215
+ }
216
+ @media screen and (min-width: 1366) {
217
+ font-size: 13px;
218
+ }
219
+ @media screen and (max-width: 1366) {
220
+ font-size: 13px;
221
+ }
222
+ @media screen and (min-width: 1440) {
223
+ font-size: 16px;
224
+ }
225
+ @media screen and (max-width: 1440) {
226
+ font-size: 16px;
227
+ }
228
+ line-height: 13px;
229
+ text-align: left;
230
+ font-weight: 600;
231
+ line-height: normal;
232
+ color: ${TEXT_COLOR_NEUTRAL_2};
233
+ border-radius: 10px;
234
+ border: 2px solid #fafaff;
235
+ padding: 15px;
236
+ cursor: pointer;
237
+ margin: 10px;
238
+ :hover {
239
+ background-color: #fafaff;
240
+ }
241
+ `;
@@ -0,0 +1,48 @@
1
+ import React from 'react';
2
+ import {
3
+ Accordion,
4
+ AccordionSummary,
5
+ AccordionDetails
6
+ } from '@material-ui/core';
7
+ import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
8
+ import { makeStyles } from '@material-ui/core/styles';
9
+
10
+ const useStyles = makeStyles({
11
+ root: {},
12
+ content: {
13
+ display: 'flex',
14
+ alignItems: 'center',
15
+ gap: '0.5rem'
16
+ }
17
+ });
18
+
19
+ const CustomAccordion = ({ icon, title, children, defaultExpanded }) => {
20
+ const classes = useStyles();
21
+
22
+ return (
23
+ <Accordion
24
+ style={{
25
+ boxShadow: 'none',
26
+ marginTop: '1rem'
27
+ }}
28
+ defaultExpanded={defaultExpanded}
29
+ >
30
+ <AccordionSummary
31
+ classes={{ content: classes.content, root: classes.root }}
32
+ expandIcon={<ExpandMoreIcon />}
33
+ >
34
+ {icon && icon}
35
+ {title && title}
36
+ </AccordionSummary>
37
+ <AccordionDetails
38
+ style={{
39
+ display: 'inherit'
40
+ }}
41
+ >
42
+ {children}
43
+ </AccordionDetails>
44
+ </Accordion>
45
+ );
46
+ };
47
+
48
+ export default CustomAccordion;
@@ -0,0 +1,15 @@
1
+ import Sidebar from './sidebar';
2
+ import Panel from './panel';
3
+ import PanelLayers from './panel-layers';
4
+ import PanelLayerElement from './panel-layer-elements';
5
+ import PanelGuides from './panel-guides';
6
+
7
+ export { Sidebar, Panel, PanelLayers, PanelLayerElement, PanelGuides };
8
+
9
+ export default {
10
+ Sidebar,
11
+ Panel,
12
+ PanelLayers,
13
+ PanelLayerElement,
14
+ PanelGuides
15
+ };
@@ -0,0 +1,73 @@
1
+ import React, { Component } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import ItemAttributesEditor from './item-attributes-editor';
4
+ import LineAttributesEditor from './line-attributes-editor';
5
+ import HoleAttributesEditor from './hole-attributes-editor';
6
+
7
+ export default function AttributesEditor({
8
+ element,
9
+ onUpdate,
10
+ onValid,
11
+ propertiesFormData,
12
+ catalog,
13
+ attributeFormData,
14
+ onConfigUpdate,
15
+ state,
16
+ internalState,
17
+ ...rest
18
+ }) {
19
+ switch (element.prototype) {
20
+ case 'items':
21
+ return (
22
+ <ItemAttributesEditor
23
+ element={element}
24
+ onUpdate={onUpdate}
25
+ onValid={onValid}
26
+ propertiesFormData={propertiesFormData}
27
+ catalog={catalog}
28
+ attributeFormData={attributeFormData}
29
+ onConfigUpdate={onConfigUpdate}
30
+ state={state}
31
+ internalState={internalState}
32
+ {...rest}
33
+ />
34
+ );
35
+ case 'lines':
36
+ return (
37
+ <LineAttributesEditor
38
+ element={element}
39
+ onUpdate={onUpdate}
40
+ onValid={onValid}
41
+ attributeFormData={attributeFormData}
42
+ state={state}
43
+ {...rest}
44
+ />
45
+ );
46
+ case 'holes':
47
+ return (
48
+ <HoleAttributesEditor
49
+ element={element}
50
+ onUpdate={onUpdate}
51
+ propertiesFormData={propertiesFormData}
52
+ catalog={catalog}
53
+ onConfigUpdate={onConfigUpdate}
54
+ onValid={onValid}
55
+ attributeFormData={attributeFormData}
56
+ state={state}
57
+ {...rest}
58
+ />
59
+ );
60
+ case 'areas':
61
+ return null;
62
+ }
63
+
64
+ return null;
65
+ }
66
+
67
+ AttributesEditor.propTypes = {
68
+ element: PropTypes.object.isRequired,
69
+ onUpdate: PropTypes.func.isRequired,
70
+ onValid: PropTypes.func,
71
+ attributeFormData: PropTypes.object.isRequired,
72
+ state: PropTypes.object.isRequired
73
+ };
@@ -0,0 +1,101 @@
1
+ import React from 'react';
2
+ import * as S from '../../../toolbar/popup/floorplan/choose-floor/styles';
3
+ import * as PS from '../../../toolbar/popup/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.ok();
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
+ The item will be placed outside the floor plan
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();
69
+ }}
70
+ >
71
+ <img
72
+ width={'80px'}
73
+ style={{ float: 'right' }}
74
+ src={'/assets/img/svg/toolbar/cancel_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/use_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,149 @@
1
+ import React, { Component } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { PropertyLengthMeasure } from '../../../../catalog/properties/export';
4
+ import PropertyString from '../../../../catalog/properties/property-string';
5
+ import {
6
+ DEFAULT_FONT_FAMILY,
7
+ TEXT_COLOR_NEUTRAL_3
8
+ } from '../../../../constants';
9
+ import styled from 'styled-components';
10
+
11
+ const NumberInputMeasure = styled.span`
12
+ font-family: ${DEFAULT_FONT_FAMILY};
13
+ font-size: 12px;
14
+ font-weight: 600;
15
+ line-height: 17px;
16
+ color: ${TEXT_COLOR_NEUTRAL_3};
17
+ position: absolute;
18
+ right: 10px;
19
+ bottom: 12px;
20
+ `;
21
+
22
+ export default function HoleAttributesEditor(
23
+ {
24
+ element,
25
+ onUpdate,
26
+ propertiesFormData,
27
+ catalog,
28
+ attributeFormData,
29
+ onConfigUpdate,
30
+ state,
31
+ internalState,
32
+ filteredProperties,
33
+ shouldOnlyShowEditorOptions = false,
34
+ ...rest
35
+ },
36
+ { translator }
37
+ ) {
38
+ // let name = attributeFormData.has('name') ? attributeFormData.get('name') : element.name;
39
+ let offsetA = attributeFormData.has('offsetA')
40
+ ? attributeFormData.get('offsetA')
41
+ : element.offsetA;
42
+ let offsetB = attributeFormData.has('offsetB')
43
+ ? attributeFormData.get('offsetB')
44
+ : element.offsetA;
45
+ let unit = state.getIn([
46
+ 'scene',
47
+ 'layers',
48
+ state.scene.selectedLayer,
49
+ 'unit'
50
+ ]);
51
+ const EditorOptions = () => {
52
+ return propertiesFormData.entrySeq().map(([propertyName, data]) => {
53
+ if (catalog.categoryHasElement('Windows', element.type)) {
54
+ if (['thickness', 'width', 'height'].includes(propertyName)) {
55
+ return null;
56
+ }
57
+ }
58
+ if (catalog.categoryHasElement('Doors', element.type)) {
59
+ if (
60
+ ['altitude', 'thickness', 'width', 'height'].includes(propertyName)
61
+ ) {
62
+ return null;
63
+ }
64
+ }
65
+ if (filteredProperties) {
66
+ if (filteredProperties.includes(propertyName)) return null;
67
+ }
68
+
69
+ let catalogElement = catalog.getElement(element.type);
70
+ // if ((catalogElement.info.has_single_door === undefined || catalogElement.info.has_single_door == false) && propertyName == 'flip_doorhandle') {
71
+ // return null;
72
+ // }
73
+
74
+ let currentValue = data.get('currentValue'),
75
+ configs = data.get('configs');
76
+ let { Editor } = catalog.getPropertyType(configs.type);
77
+ return (
78
+ configs.type === 'length-measure' && (
79
+ <div style={{ position: 'relative' }} key={propertyName}>
80
+ <Editor
81
+ propertyName={propertyName}
82
+ value={currentValue}
83
+ configs={configs}
84
+ onUpdate={value => onConfigUpdate(propertyName, value)}
85
+ state={state}
86
+ sourceElement={element}
87
+ internalState={internalState}
88
+ />
89
+ <NumberInputMeasure>{unit}</NumberInputMeasure>
90
+ </div>
91
+ )
92
+ );
93
+ });
94
+ };
95
+
96
+ return (
97
+ <div>
98
+ {/* <PropertyString
99
+ value={name}
100
+ onUpdate={mapped => onUpdate('name', mapped)}
101
+ configs={{label: 'Name'}}
102
+ state={state}
103
+ {...rest}
104
+ /> */}
105
+ {EditorOptions()}
106
+ <div style={{ position: 'relative' }}>
107
+ <PropertyLengthMeasure
108
+ value={offsetA}
109
+ onUpdate={mapped => onUpdate('offsetA', mapped)}
110
+ configs={{
111
+ label: 'Offset Left',
112
+ min: 0,
113
+ max: Infinity,
114
+ precision: 2
115
+ }}
116
+ state={state}
117
+ {...rest}
118
+ />
119
+ <NumberInputMeasure>{unit}</NumberInputMeasure>
120
+ </div>
121
+ <div style={{ position: 'relative' }}>
122
+ <PropertyLengthMeasure
123
+ value={offsetB}
124
+ onUpdate={mapped => onUpdate('offsetB', mapped)}
125
+ configs={{
126
+ label: 'Offset Right',
127
+ min: 0,
128
+ max: Infinity,
129
+ precision: 2
130
+ }}
131
+ state={state}
132
+ {...rest}
133
+ />
134
+ <NumberInputMeasure>{unit}</NumberInputMeasure>
135
+ </div>
136
+ </div>
137
+ );
138
+ }
139
+
140
+ HoleAttributesEditor.propTypes = {
141
+ element: PropTypes.object.isRequired,
142
+ onUpdate: PropTypes.func.isRequired,
143
+ attributeFormData: PropTypes.object.isRequired,
144
+ state: PropTypes.object.isRequired
145
+ };
146
+
147
+ HoleAttributesEditor.contextTypes = {
148
+ translator: PropTypes.object.isRequired
149
+ };