kitchen-simulator 5.0.0-test.7 → 5.0.0-test.9
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 +12 -3
- package/src/components/export.js +16 -23
- 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/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 -5627
- 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
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
import React, { Component } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import Panel from './panel';
|
|
4
|
-
import * as SharedStyle from '../../shared-style';
|
|
5
|
-
import { TiPlus, TiDelete } from 'react-icons/ti';
|
|
6
|
-
import { FaTrash, FaEye, FaLink, FaUnlink } from 'react-icons/fa';
|
|
7
|
-
import { Map } from 'immutable';
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
MODE_IDLE,
|
|
11
|
-
MODE_2D_ZOOM_IN,
|
|
12
|
-
MODE_2D_ZOOM_OUT,
|
|
13
|
-
MODE_2D_PAN,
|
|
14
|
-
MODE_3D_VIEW,
|
|
15
|
-
MODE_3D_FIRST_PERSON,
|
|
16
|
-
MODE_WAITING_DRAWING_LINE,
|
|
17
|
-
MODE_DRAWING_LINE,
|
|
18
|
-
MODE_DRAWING_HOLE,
|
|
19
|
-
MODE_DRAWING_ITEM,
|
|
20
|
-
MODE_DRAGGING_LINE,
|
|
21
|
-
MODE_DRAGGING_VERTEX,
|
|
22
|
-
MODE_DRAGGING_ITEM,
|
|
23
|
-
MODE_DRAGGING_HOLE,
|
|
24
|
-
MODE_FITTING_IMAGE,
|
|
25
|
-
MODE_UPLOADING_IMAGE,
|
|
26
|
-
MODE_ROTATING_ITEM,
|
|
27
|
-
MODE_IDLE_3D,
|
|
28
|
-
MODE_DRAGGING_ITEM_3D,
|
|
29
|
-
MODE_ROTATING_ITEM_3D
|
|
30
|
-
} from '../../constants';
|
|
31
|
-
|
|
32
|
-
const VISIBILITY_MODE = {
|
|
33
|
-
MODE_IDLE,
|
|
34
|
-
MODE_2D_ZOOM_IN,
|
|
35
|
-
MODE_2D_ZOOM_OUT,
|
|
36
|
-
MODE_2D_PAN,
|
|
37
|
-
MODE_3D_VIEW,
|
|
38
|
-
MODE_3D_FIRST_PERSON,
|
|
39
|
-
MODE_WAITING_DRAWING_LINE,
|
|
40
|
-
MODE_DRAWING_LINE,
|
|
41
|
-
MODE_DRAWING_HOLE,
|
|
42
|
-
MODE_DRAWING_ITEM,
|
|
43
|
-
MODE_DRAGGING_LINE,
|
|
44
|
-
MODE_DRAGGING_VERTEX,
|
|
45
|
-
MODE_DRAGGING_ITEM,
|
|
46
|
-
MODE_DRAGGING_HOLE,
|
|
47
|
-
MODE_FITTING_IMAGE,
|
|
48
|
-
MODE_UPLOADING_IMAGE,
|
|
49
|
-
MODE_ROTATING_ITEM,
|
|
50
|
-
MODE_IDLE_3D,
|
|
51
|
-
MODE_DRAGGING_ITEM_3D,
|
|
52
|
-
MODE_ROTATING_ITEM_3D
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
const styleEditButton = {
|
|
56
|
-
marginLeft: '5px',
|
|
57
|
-
border: '0px',
|
|
58
|
-
background: 'none',
|
|
59
|
-
color: SharedStyle.COLORS.white,
|
|
60
|
-
fontSize: '14px',
|
|
61
|
-
outline: '0px'
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
const tablegroupStyle = {
|
|
65
|
-
width: '100%',
|
|
66
|
-
cursor: 'pointer',
|
|
67
|
-
maxHeight: '20em',
|
|
68
|
-
padding: '0 1em',
|
|
69
|
-
marginLeft: '1px'
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
const iconColStyle = { width: '2em', textAlign: 'center' };
|
|
73
|
-
const styleHoverColor = { color: SharedStyle.SECONDARY_COLOR.main };
|
|
74
|
-
const styleEditButtonHover = { ...styleEditButton, ...styleHoverColor };
|
|
75
|
-
const styleAddLabel = { fontSize: '10px', marginLeft: '5px' };
|
|
76
|
-
const styleEyeVisible = { fontSize: '1.25em' };
|
|
77
|
-
const styleEyeHidden = { ...styleEyeVisible, color: '#a5a1a1' };
|
|
78
|
-
const newLayerLableStyle = {
|
|
79
|
-
fontSize: '1.3em',
|
|
80
|
-
cursor: 'pointer',
|
|
81
|
-
textAlign: 'center'
|
|
82
|
-
};
|
|
83
|
-
const newLayerLableHoverStyle = { ...newLayerLableStyle, ...styleHoverColor };
|
|
84
|
-
|
|
85
|
-
export default class PanelGroups extends Component {
|
|
86
|
-
constructor(props, context) {
|
|
87
|
-
super(props, context);
|
|
88
|
-
|
|
89
|
-
this.state = {
|
|
90
|
-
newEmptyHover: false,
|
|
91
|
-
newSelectedHover: false
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
shouldComponentUpdate(nextProps, nextState) {
|
|
96
|
-
return (
|
|
97
|
-
this.props.groups.hashCode() !== nextProps.groups.hashCode() ||
|
|
98
|
-
this.props.layers.hashCode() !== nextProps.layers.hashCode() ||
|
|
99
|
-
this.props.mode !== nextProps.mode
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
render() {
|
|
104
|
-
let { mode, groups, layers } = this.props;
|
|
105
|
-
|
|
106
|
-
if (!VISIBILITY_MODE[mode]) return null;
|
|
107
|
-
|
|
108
|
-
return (
|
|
109
|
-
<Panel
|
|
110
|
-
name={this.context.translator.t('Groups')}
|
|
111
|
-
opened={groups.size > 0}
|
|
112
|
-
>
|
|
113
|
-
{groups.size ? (
|
|
114
|
-
<table style={tablegroupStyle}>
|
|
115
|
-
<thead>
|
|
116
|
-
<tr>
|
|
117
|
-
<th colSpan="4"></th>
|
|
118
|
-
<th>{this.context.translator.t('Elements')}</th>
|
|
119
|
-
<th>{this.context.translator.t('Name')}</th>
|
|
120
|
-
</tr>
|
|
121
|
-
</thead>
|
|
122
|
-
<tbody>
|
|
123
|
-
{groups.entrySeq().map(([groupID, group]) => {
|
|
124
|
-
let selectClick = e =>
|
|
125
|
-
this.context.groupsActions.selectGroup(groupID);
|
|
126
|
-
|
|
127
|
-
let swapVisibility = e => {
|
|
128
|
-
e.stopPropagation();
|
|
129
|
-
this.context.groupsActions.setGroupProperties(
|
|
130
|
-
groupID,
|
|
131
|
-
new Map({ visible: !group.get('visible') })
|
|
132
|
-
);
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
let chainToGroup = e => {
|
|
136
|
-
layers.forEach(layer => {
|
|
137
|
-
let layerID = layer.get('id');
|
|
138
|
-
let layerElements = {
|
|
139
|
-
lines: layer.get('lines'),
|
|
140
|
-
items: layer.get('items'),
|
|
141
|
-
holes: layer.get('holes'),
|
|
142
|
-
areas: layer.get('areas')
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
for (let elementPrototype in layerElements) {
|
|
146
|
-
let ElementList = layerElements[elementPrototype];
|
|
147
|
-
ElementList.filter(el => el.get('selected')).forEach(
|
|
148
|
-
element => {
|
|
149
|
-
this.context.groupsActions.addToGroup(
|
|
150
|
-
groupID,
|
|
151
|
-
layerID,
|
|
152
|
-
elementPrototype,
|
|
153
|
-
element.get('id')
|
|
154
|
-
);
|
|
155
|
-
}
|
|
156
|
-
);
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
selectClick(e);
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
let isCurrentgroup = group.get('selected');
|
|
164
|
-
let shouldHighlight = isCurrentgroup;
|
|
165
|
-
let rowStyle = !shouldHighlight ? null : styleHoverColor;
|
|
166
|
-
|
|
167
|
-
let dimension = group.get('elements').reduce((sum, layer) => {
|
|
168
|
-
return (
|
|
169
|
-
sum + layer.reduce((lSum, elProt) => lSum + elProt.size, 0)
|
|
170
|
-
);
|
|
171
|
-
}, 0);
|
|
172
|
-
|
|
173
|
-
return (
|
|
174
|
-
<tr key={groupID} style={rowStyle}>
|
|
175
|
-
<td
|
|
176
|
-
style={iconColStyle}
|
|
177
|
-
title={this.context.translator.t(
|
|
178
|
-
'Toggle Group Visibility'
|
|
179
|
-
)}
|
|
180
|
-
>
|
|
181
|
-
<FaEye
|
|
182
|
-
onClick={swapVisibility}
|
|
183
|
-
style={
|
|
184
|
-
!group.get('visible')
|
|
185
|
-
? styleEyeHidden
|
|
186
|
-
: styleEyeVisible
|
|
187
|
-
}
|
|
188
|
-
/>
|
|
189
|
-
</td>
|
|
190
|
-
<td
|
|
191
|
-
style={iconColStyle}
|
|
192
|
-
title={this.context.translator.t(
|
|
193
|
-
'Chain selected Elements to Group'
|
|
194
|
-
)}
|
|
195
|
-
>
|
|
196
|
-
<FaLink
|
|
197
|
-
onClick={chainToGroup}
|
|
198
|
-
style={
|
|
199
|
-
!shouldHighlight
|
|
200
|
-
? styleEditButton
|
|
201
|
-
: styleEditButtonHover
|
|
202
|
-
}
|
|
203
|
-
/>
|
|
204
|
-
</td>
|
|
205
|
-
<td
|
|
206
|
-
style={iconColStyle}
|
|
207
|
-
title={this.context.translator.t(
|
|
208
|
-
"Un-chain all Group's Elements and remove Group"
|
|
209
|
-
)}
|
|
210
|
-
>
|
|
211
|
-
<FaUnlink
|
|
212
|
-
onClick={e =>
|
|
213
|
-
this.context.groupsActions.removeGroup(groupID)
|
|
214
|
-
}
|
|
215
|
-
style={
|
|
216
|
-
!shouldHighlight
|
|
217
|
-
? styleEditButton
|
|
218
|
-
: styleEditButtonHover
|
|
219
|
-
}
|
|
220
|
-
/>
|
|
221
|
-
</td>
|
|
222
|
-
<td
|
|
223
|
-
style={iconColStyle}
|
|
224
|
-
title={this.context.translator.t(
|
|
225
|
-
'Delete group and all Elements'
|
|
226
|
-
)}
|
|
227
|
-
>
|
|
228
|
-
<FaTrash
|
|
229
|
-
onClick={e =>
|
|
230
|
-
this.context.groupsActions.removeGroupAndDeleteElements(
|
|
231
|
-
groupID
|
|
232
|
-
)
|
|
233
|
-
}
|
|
234
|
-
style={
|
|
235
|
-
!shouldHighlight
|
|
236
|
-
? styleEditButton
|
|
237
|
-
: styleEditButtonHover
|
|
238
|
-
}
|
|
239
|
-
/>
|
|
240
|
-
</td>
|
|
241
|
-
<td
|
|
242
|
-
onClick={selectClick}
|
|
243
|
-
style={{ width: '0em', textAlign: 'center' }}
|
|
244
|
-
>
|
|
245
|
-
{dimension}
|
|
246
|
-
</td>
|
|
247
|
-
<td onClick={selectClick}>{group.get('name')}</td>
|
|
248
|
-
</tr>
|
|
249
|
-
);
|
|
250
|
-
})}
|
|
251
|
-
</tbody>
|
|
252
|
-
</table>
|
|
253
|
-
) : null}
|
|
254
|
-
|
|
255
|
-
<table style={{ width: '100%', marginTop: '0.1em' }}>
|
|
256
|
-
<tbody>
|
|
257
|
-
<tr>
|
|
258
|
-
<td
|
|
259
|
-
style={
|
|
260
|
-
!this.state.newEmptyHover
|
|
261
|
-
? newLayerLableStyle
|
|
262
|
-
: newLayerLableHoverStyle
|
|
263
|
-
}
|
|
264
|
-
onMouseOver={() => this.setState({ newEmptyHover: true })}
|
|
265
|
-
onMouseOut={() => this.setState({ newEmptyHover: false })}
|
|
266
|
-
onClick={e => this.context.groupsActions.addGroup()}
|
|
267
|
-
>
|
|
268
|
-
<TiPlus />
|
|
269
|
-
<b style={styleAddLabel}>
|
|
270
|
-
{this.context.translator.t('New Empty Group')}
|
|
271
|
-
</b>
|
|
272
|
-
</td>
|
|
273
|
-
<td
|
|
274
|
-
style={
|
|
275
|
-
!this.state.newSelectedHover
|
|
276
|
-
? newLayerLableStyle
|
|
277
|
-
: newLayerLableHoverStyle
|
|
278
|
-
}
|
|
279
|
-
onMouseOver={() => this.setState({ newSelectedHover: true })}
|
|
280
|
-
onMouseOut={() => this.setState({ newSelectedHover: false })}
|
|
281
|
-
onClick={e => this.context.groupsActions.addGroupFromSelected()}
|
|
282
|
-
>
|
|
283
|
-
<TiPlus />
|
|
284
|
-
<b style={styleAddLabel}>
|
|
285
|
-
{this.context.translator.t('New Group from selected')}
|
|
286
|
-
</b>
|
|
287
|
-
</td>
|
|
288
|
-
</tr>
|
|
289
|
-
</tbody>
|
|
290
|
-
</table>
|
|
291
|
-
</Panel>
|
|
292
|
-
);
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
PanelGroups.propTypes = {
|
|
297
|
-
mode: PropTypes.string.isRequired,
|
|
298
|
-
groups: PropTypes.object.isRequired,
|
|
299
|
-
layers: PropTypes.object.isRequired
|
|
300
|
-
};
|
|
301
|
-
|
|
302
|
-
PanelGroups.contextTypes = {
|
|
303
|
-
catalog: PropTypes.object.isRequired,
|
|
304
|
-
translator: PropTypes.object.isRequired,
|
|
305
|
-
itemsActions: PropTypes.object.isRequired,
|
|
306
|
-
linesActions: PropTypes.object.isRequired,
|
|
307
|
-
holesActions: PropTypes.object.isRequired,
|
|
308
|
-
groupsActions: PropTypes.object.isRequired,
|
|
309
|
-
projectActions: PropTypes.object.isRequired
|
|
310
|
-
};
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import React, { Component } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import Panel from './panel';
|
|
4
|
-
import * as SharedStyle from '../../shared-style';
|
|
5
|
-
import { Tab, Tabs, TabList, TabPanel } from 'react-tabs';
|
|
6
|
-
import { FaPencil, FaTrash, FaTimes } from 'react-icons/fa';
|
|
7
|
-
import { FormNumberInput } from '../../components/style/export';
|
|
8
|
-
|
|
9
|
-
const tabStyle = { margin: '1em' };
|
|
10
|
-
|
|
11
|
-
const iconStyle = {
|
|
12
|
-
fontSize: '14px',
|
|
13
|
-
margin: '2px',
|
|
14
|
-
cursor: 'pointer'
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
const addGuideStyle = {
|
|
18
|
-
cursor: 'pointer',
|
|
19
|
-
height: '2em'
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const tableTabStyle = {
|
|
23
|
-
width: '100%',
|
|
24
|
-
textAlign: 'center'
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export default class PanelGuides extends Component {
|
|
28
|
-
constructor(props, context) {
|
|
29
|
-
super(props, context);
|
|
30
|
-
|
|
31
|
-
this.state = {
|
|
32
|
-
addHGVisible: true,
|
|
33
|
-
addVGVisible: true,
|
|
34
|
-
addCGVisible: true
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
shouldComponentUpdate(nextProps, nextState) {
|
|
39
|
-
return (
|
|
40
|
-
this.state.addHGVisible !== nextState.addHGVisible ||
|
|
41
|
-
this.state.addVGVisible !== nextState.addVGVisible ||
|
|
42
|
-
this.state.addCGVisible !== nextState.addCGVisible ||
|
|
43
|
-
this.props.state.getIn(['scene', 'guides']).hashCode() !==
|
|
44
|
-
nextProps.state.getIn(['scene', 'guides']).hashCode()
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
render() {
|
|
49
|
-
let { state } = this.props;
|
|
50
|
-
let { projectActions, translator } = this.context;
|
|
51
|
-
let { guides } = state.scene;
|
|
52
|
-
|
|
53
|
-
return (
|
|
54
|
-
<Panel name={translator.t('Guides')}>
|
|
55
|
-
<Tabs id="guidesTabs" style={tabStyle}>
|
|
56
|
-
<TabList>
|
|
57
|
-
<Tab>{translator.t('Horizontal')}</Tab>
|
|
58
|
-
<Tab>{translator.t('Vertical')}</Tab>
|
|
59
|
-
{/*<Tab>{translator.t('Circular')}</Tab>*/}
|
|
60
|
-
</TabList>
|
|
61
|
-
|
|
62
|
-
<TabPanel>
|
|
63
|
-
<table style={tableTabStyle}>
|
|
64
|
-
<tbody>
|
|
65
|
-
{guides
|
|
66
|
-
.get('horizontal')
|
|
67
|
-
.entrySeq()
|
|
68
|
-
.map(([hgKey, hgVal], ind) => {
|
|
69
|
-
return (
|
|
70
|
-
<tr key={hgKey}>
|
|
71
|
-
<td style={{ width: '2em' }}>{ind + 1}</td>
|
|
72
|
-
<td>{hgVal}</td>
|
|
73
|
-
<td style={{ width: '5em' }}>
|
|
74
|
-
{/*<FaPencil style={iconStyle} />*/}
|
|
75
|
-
<FaTrash
|
|
76
|
-
style={iconStyle}
|
|
77
|
-
onClick={e =>
|
|
78
|
-
projectActions.removeHorizontalGuide(hgKey)
|
|
79
|
-
}
|
|
80
|
-
/>
|
|
81
|
-
</td>
|
|
82
|
-
</tr>
|
|
83
|
-
);
|
|
84
|
-
})}
|
|
85
|
-
{this.state.addHGVisible ? (
|
|
86
|
-
<tr>
|
|
87
|
-
<td
|
|
88
|
-
colSpan="3"
|
|
89
|
-
style={addGuideStyle}
|
|
90
|
-
onClick={e => this.setState({ addHGVisible: false })}
|
|
91
|
-
>
|
|
92
|
-
{translator.t('+ Add Horizontal Giude')}
|
|
93
|
-
</td>
|
|
94
|
-
</tr>
|
|
95
|
-
) : (
|
|
96
|
-
<tr>
|
|
97
|
-
<td colSpan="2">
|
|
98
|
-
<FormNumberInput
|
|
99
|
-
value={0}
|
|
100
|
-
onChange={e => {
|
|
101
|
-
projectActions.addHorizontalGuide(e.target.value);
|
|
102
|
-
return this.setState({ addHGVisible: true });
|
|
103
|
-
}}
|
|
104
|
-
min={0}
|
|
105
|
-
max={this.props.state.getIn(['scene', 'height'])}
|
|
106
|
-
/>
|
|
107
|
-
</td>
|
|
108
|
-
<td>
|
|
109
|
-
<FaTimes
|
|
110
|
-
style={iconStyle}
|
|
111
|
-
onClick={e => this.setState({ addHGVisible: true })}
|
|
112
|
-
/>
|
|
113
|
-
</td>
|
|
114
|
-
</tr>
|
|
115
|
-
)}
|
|
116
|
-
</tbody>
|
|
117
|
-
</table>
|
|
118
|
-
</TabPanel>
|
|
119
|
-
<TabPanel>
|
|
120
|
-
<table style={tableTabStyle}>
|
|
121
|
-
<tbody>
|
|
122
|
-
{guides
|
|
123
|
-
.get('vertical')
|
|
124
|
-
.entrySeq()
|
|
125
|
-
.map(([hgKey, hgVal], ind) => {
|
|
126
|
-
return (
|
|
127
|
-
<tr key={hgKey}>
|
|
128
|
-
<td style={{ width: '2em' }}>{ind + 1}</td>
|
|
129
|
-
<td>{hgVal}</td>
|
|
130
|
-
<td style={{ width: '5em' }}>
|
|
131
|
-
{/*<FaPencil style={iconStyle} />*/}
|
|
132
|
-
<FaTrash
|
|
133
|
-
style={iconStyle}
|
|
134
|
-
onClick={e =>
|
|
135
|
-
projectActions.removeVerticalGuide(hgKey)
|
|
136
|
-
}
|
|
137
|
-
/>
|
|
138
|
-
</td>
|
|
139
|
-
</tr>
|
|
140
|
-
);
|
|
141
|
-
})}
|
|
142
|
-
{this.state.addVGVisible ? (
|
|
143
|
-
<tr>
|
|
144
|
-
<td
|
|
145
|
-
colSpan="3"
|
|
146
|
-
style={addGuideStyle}
|
|
147
|
-
onClick={e => this.setState({ addVGVisible: false })}
|
|
148
|
-
>
|
|
149
|
-
{translator.t('+ Add Vertical Giude')}
|
|
150
|
-
</td>
|
|
151
|
-
</tr>
|
|
152
|
-
) : (
|
|
153
|
-
<tr>
|
|
154
|
-
<td colSpan="2">
|
|
155
|
-
<FormNumberInput
|
|
156
|
-
value={0}
|
|
157
|
-
onChange={e => {
|
|
158
|
-
projectActions.addVerticalGuide(e.target.value);
|
|
159
|
-
return this.setState({ addVGVisible: true });
|
|
160
|
-
}}
|
|
161
|
-
min={0}
|
|
162
|
-
max={this.props.state.getIn(['scene', 'height'])}
|
|
163
|
-
/>
|
|
164
|
-
</td>
|
|
165
|
-
<td>
|
|
166
|
-
<FaTimes
|
|
167
|
-
style={iconStyle}
|
|
168
|
-
onClick={e => this.setState({ addVGVisible: true })}
|
|
169
|
-
/>
|
|
170
|
-
</td>
|
|
171
|
-
</tr>
|
|
172
|
-
)}
|
|
173
|
-
</tbody>
|
|
174
|
-
</table>
|
|
175
|
-
</TabPanel>
|
|
176
|
-
{/*<TabPanel>
|
|
177
|
-
<b>TODO Circular Giudes</b>
|
|
178
|
-
</TabPanel>*/}
|
|
179
|
-
</Tabs>
|
|
180
|
-
</Panel>
|
|
181
|
-
);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
PanelGuides.propTypes = {
|
|
186
|
-
state: PropTypes.object.isRequired
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
PanelGuides.contextTypes = {
|
|
190
|
-
translator: PropTypes.object.isRequired,
|
|
191
|
-
projectActions: PropTypes.object.isRequired
|
|
192
|
-
};
|