kitchen-simulator 5.0.0-test.6 → 5.0.0-test.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +23 -3
- package/src/components/_export.js +11 -0
- package/src/components/viewer3d/scene-creator.js +23 -26
- package/src/components/viewer3d/viewer3d.js +18 -18
- package/src/components/catalog-view/catalog-breadcrumb.jsx +0 -53
- package/src/components/catalog-view/catalog-item.jsx +0 -229
- package/src/components/catalog-view/catalog-list.jsx +0 -173
- package/src/components/catalog-view/catalog-page-item.jsx +0 -110
- package/src/components/catalog-view/catalog-turn-back-page-item.jsx +0 -80
- package/src/components/configurator/custom-configurator.jsx +0 -77
- package/src/components/configurator/project-configurator.jsx +0 -120
- package/src/components/export.js +0 -36
- package/src/components/firstsetting/button/styles.js +0 -223
- package/src/components/firstsetting/export.js +0 -9
- package/src/components/firstsetting/firstsetting-content-button.jsx +0 -198
- package/src/components/firstsetting/firstsetting-toggle-button.jsx +0 -101
- package/src/components/firstsetting/firstsetting.jsx +0 -814
- package/src/components/footerbar/button/ControlButton.jsx +0 -43
- package/src/components/footerbar/button/DirectionButton.jsx +0 -54
- package/src/components/footerbar/button/DirectionPanSpinButton.jsx +0 -36
- package/src/components/footerbar/button/ToggleButton.jsx +0 -58
- package/src/components/footerbar/button/ToggleConvertButton.jsx +0 -48
- package/src/components/footerbar/button/ToggleMeasureButton.jsx +0 -33
- package/src/components/footerbar/button/styles.js +0 -217
- package/src/components/footerbar/export.js +0 -9
- package/src/components/footerbar/footer-content-button.jsx +0 -198
- package/src/components/footerbar/footer-toggle-button.jsx +0 -101
- package/src/components/footerbar/footerbar.jsx +0 -1103
- package/src/components/footerbar/styles.js +0 -263
- package/src/components/header/button/MenuButton.jsx +0 -46
- package/src/components/header/button/SaveButton.jsx +0 -54
- package/src/components/header/button/styles.js +0 -181
- package/src/components/header/export.js +0 -5
- package/src/components/header/header.jsx +0 -631
- package/src/components/header/header.style.css +0 -47
- package/src/components/header/styles.js +0 -320
- package/src/components/login/Login.js +0 -77
- package/src/components/login/LoginForm/index.js +0 -108
- package/src/components/login/Register.js +0 -83
- package/src/components/login/RegisterForm/index.js +0 -171
- package/src/components/login/jwtService.js +0 -201
- package/src/components/login/style.css +0 -158
- package/src/components/login/style.scss +0 -260
- package/src/components/myprojects/export.js +0 -5
- package/src/components/myprojects/index.jsx +0 -445
- package/src/components/myprojects/styles.js +0 -241
- package/src/components/sidebar/custom-accordion.jsx +0 -48
- package/src/components/sidebar/export.js +0 -15
- package/src/components/sidebar/panel-element-editor/attributes-editor/attributes-editor.jsx +0 -73
- package/src/components/sidebar/panel-element-editor/attributes-editor/confirm-popup.jsx +0 -101
- package/src/components/sidebar/panel-element-editor/attributes-editor/hole-attributes-editor.jsx +0 -149
- package/src/components/sidebar/panel-element-editor/attributes-editor/item-attributes-editor.jsx +0 -316
- package/src/components/sidebar/panel-element-editor/attributes-editor/line-attributes-editor.jsx +0 -108
- package/src/components/sidebar/panel-element-editor/element-editor.jsx +0 -1070
- package/src/components/sidebar/panel-element-editor/multi-elements-editor.jsx +0 -0
- package/src/components/sidebar/panel-element-editor/panel-element-editor.jsx +0 -104
- package/src/components/sidebar/panel-element-editor/panel-multi-elements-editor.jsx +0 -155
- package/src/components/sidebar/panel-group-editor.jsx +0 -272
- package/src/components/sidebar/panel-groups.jsx +0 -310
- package/src/components/sidebar/panel-guides.jsx +0 -192
- package/src/components/sidebar/panel-layer-elements.jsx +0 -298
- package/src/components/sidebar/panel-layers.jsx +0 -381
- package/src/components/sidebar/panel.jsx +0 -71
- package/src/components/sidebar/sidebar.jsx +0 -106
- package/src/components/sidebar/toolbar-panel.jsx +0 -139
- package/src/components/sign/export.js +0 -7
- package/src/components/sign/main/index.jsx +0 -523
- package/src/components/sign/main/styles.js +0 -163
- package/src/components/toolbar/button/ControlButton.jsx +0 -41
- package/src/components/toolbar/button/DirectionButton.jsx +0 -34
- package/src/components/toolbar/button/RightButton.jsx +0 -103
- package/src/components/toolbar/button/ToggleButton.jsx +0 -41
- package/src/components/toolbar/button/index.jsx +0 -55
- package/src/components/toolbar/button/styles.js +0 -127
- package/src/components/toolbar/components/DoorStyleMenu.jsx +0 -103
- package/src/components/toolbar/components/Pricing.jsx +0 -126
- package/src/components/toolbar/components/ReviewForQuote.jsx +0 -635
- package/src/components/toolbar/export.js +0 -21
- package/src/components/toolbar/main/Alert.js +0 -122
- package/src/components/toolbar/main/TakePictureModal.jsx +0 -104
- package/src/components/toolbar/main/confirm-popup.jsx +0 -99
- package/src/components/toolbar/main/index.jsx +0 -5687
- package/src/components/toolbar/main/lShaped.json +0 -311
- package/src/components/toolbar/main/longNarrow.json +0 -238
- package/src/components/toolbar/main/myComponents.js +0 -123
- package/src/components/toolbar/main/oRectangle.json +0 -220
- package/src/components/toolbar/main/rectangle.json +0 -238
- package/src/components/toolbar/main/style.css +0 -107
- package/src/components/toolbar/main/styles.js +0 -696
- package/src/components/toolbar/plugin-item.jsx +0 -123
- package/src/components/toolbar/popup/appliance/appliance-category/index.jsx +0 -73
- package/src/components/toolbar/popup/appliance/choose-appliance/index.jsx +0 -102
- package/src/components/toolbar/popup/appliance/index.jsx +0 -83
- package/src/components/toolbar/popup/autosaveprompt/index.jsx +0 -150
- package/src/components/toolbar/popup/autosaveprompt/styles.css +0 -64
- package/src/components/toolbar/popup/autosaveprompt/styles.js +0 -40
- package/src/components/toolbar/popup/cabinet/cabinet-category/index.jsx +0 -73
- package/src/components/toolbar/popup/cabinet/choose-product/index.jsx +0 -119
- package/src/components/toolbar/popup/cabinet/index.jsx +0 -85
- package/src/components/toolbar/popup/doorStyle/choose-style/index.jsx +0 -63
- package/src/components/toolbar/popup/doorStyle/index.jsx +0 -71
- package/src/components/toolbar/popup/doorStyle/style-category/index.jsx +0 -139
- package/src/components/toolbar/popup/downloadsummary/downloadSummaryContext.js +0 -2
- package/src/components/toolbar/popup/downloadsummary/downloadSummaryTemp.jsx +0 -157
- package/src/components/toolbar/popup/downloadsummary/index.jsx +0 -643
- package/src/components/toolbar/popup/downloadsummary/show2D/show2DView.jsx +0 -51
- package/src/components/toolbar/popup/downloadsummary/show2D/viewer2DDownLoad.jsx +0 -175
- package/src/components/toolbar/popup/downloadsummary/show3D/show3DView.jsx +0 -283
- package/src/components/toolbar/popup/downloadsummary/show3D/viewer3DDownLoad.jsx +0 -2257
- package/src/components/toolbar/popup/downloadsummary/showCabinetInfo.js +0 -93
- package/src/components/toolbar/popup/downloadsummary/showElevation/showElevationView.jsx +0 -132
- package/src/components/toolbar/popup/downloadsummary/showElevation/viewer3DElevationDownload.jsx +0 -2198
- package/src/components/toolbar/popup/downloadsummary/showElevation/viewerElevationDownload.jsx +0 -152
- package/src/components/toolbar/popup/downloadsummary/showWarranty.jsx +0 -149
- package/src/components/toolbar/popup/downloadsummary/styles.css +0 -177
- package/src/components/toolbar/popup/downloadsummary/styles.js +0 -453
- package/src/components/toolbar/popup/finishingtouch/category/index.jsx +0 -34
- package/src/components/toolbar/popup/finishingtouch/index.jsx +0 -58
- package/src/components/toolbar/popup/finishingtouch/material-edit.jsx +0 -112
- package/src/components/toolbar/popup/finishingtouch/product/index.jsx +0 -116
- package/src/components/toolbar/popup/floorplan/choose-floor/confirm-popup.jsx +0 -101
- package/src/components/toolbar/popup/floorplan/choose-floor/index.jsx +0 -254
- package/src/components/toolbar/popup/floorplan/choose-floor/lShaped.json +0 -311
- package/src/components/toolbar/popup/floorplan/choose-floor/longNarrow.json +0 -238
- package/src/components/toolbar/popup/floorplan/choose-floor/oRectangle.json +0 -220
- package/src/components/toolbar/popup/floorplan/choose-floor/rectangle.json +0 -238
- package/src/components/toolbar/popup/floorplan/choose-floor/styles.js +0 -86
- package/src/components/toolbar/popup/floorplan/floor-category/index.jsx +0 -109
- package/src/components/toolbar/popup/floorplan/index.jsx +0 -60
- package/src/components/toolbar/popup/index.jsx +0 -241
- package/src/components/toolbar/popup/newproject/index.jsx +0 -59
- package/src/components/toolbar/popup/newproject/styles.css +0 -64
- package/src/components/toolbar/popup/newproject/styles.js +0 -41
- package/src/components/toolbar/popup/product/appliance.jsx +0 -54
- package/src/components/toolbar/popup/product/cabinetproduct.jsx +0 -15
- package/src/components/toolbar/popup/product/doorstyle.jsx +0 -58
- package/src/components/toolbar/popup/product/doorstyleproduct.jsx +0 -47
- package/src/components/toolbar/popup/product/floor.jsx +0 -36
- package/src/components/toolbar/popup/product/floorproduct.jsx +0 -42
- package/src/components/toolbar/popup/product/index.jsx +0 -36
- package/src/components/toolbar/popup/product/primary.jsx +0 -77
- package/src/components/toolbar/popup/product/productline.jsx +0 -93
- package/src/components/toolbar/popup/product/reviewItem.jsx +0 -427
- package/src/components/toolbar/popup/product/reviewMolding.jsx +0 -310
- package/src/components/toolbar/popup/product/style.css +0 -54
- package/src/components/toolbar/popup/product/styles.js +0 -260
- package/src/components/toolbar/popup/savedesign/FullPictureForm.jsx +0 -146
- package/src/components/toolbar/popup/savedesign/index.jsx +0 -495
- package/src/components/toolbar/popup/savedesign/savedesign.style.css +0 -16
- package/src/components/toolbar/popup/savedesign/styles.js +0 -151
- package/src/components/toolbar/popup/setDoorStyleOption/index.jsx +0 -87
- package/src/components/toolbar/popup/styles.js +0 -909
- package/src/components/toolbar/popup/submitforquote/AddToCartOptions.jsx +0 -192
- package/src/components/toolbar/popup/submitforquote/CustomerRequestsForm.jsx +0 -96
- package/src/components/toolbar/popup/submitforquote/SkipDesignerReview.jsx +0 -54
- package/src/components/toolbar/popup/submitforquote/StepDots.jsx +0 -25
- package/src/components/toolbar/popup/submitforquote/cart-choice.jsx +0 -116
- package/src/components/toolbar/popup/submitforquote/doorstyle-menus.js +0 -38
- package/src/components/toolbar/popup/submitforquote/index.jsx +0 -698
- package/src/components/toolbar/popup/submitforquote/styles.css +0 -105
- package/src/components/toolbar/popup/submitforquote/styles.js +0 -294
- package/src/components/toolbar/popup/submitprompt/index.jsx +0 -89
- package/src/components/toolbar/popup/submitprompt/styles.css +0 -64
- package/src/components/toolbar/popup/submitprompt/styles.js +0 -42
- package/src/components/toolbar/toolbar-button.jsx +0 -90
- package/src/components/toolbar/toolbar-load-button.jsx +0 -36
- package/src/components/toolbar/toolbar-save-button.jsx +0 -32
- package/src/components/wizardstep/button/styles.js +0 -677
- package/src/components/wizardstep/export.js +0 -5
- package/src/components/wizardstep/index.jsx +0 -1372
- package/src/components/wizardstep/styles.js +0 -688
- package/src/components/wizardstep/wizardstep-content-button.jsx +0 -198
- package/src/components/wizardstep/wizardstep-toggle-button.jsx +0 -101
- package/src/hooks/useCheckCart.js +0 -38
- package/src/hooks/useGetPricesBySku.js +0 -59
- package/src/hooks/useValidateToken.js +0 -181
- package/src/styles/export.js +0 -7
- package/src/styles/tabs.css +0 -40
|
File without changes
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import Panel from '../panel';
|
|
4
|
-
import { Seq } from 'immutable';
|
|
5
|
-
import {
|
|
6
|
-
MODE_IDLE,
|
|
7
|
-
MODE_2D_ZOOM_IN,
|
|
8
|
-
MODE_2D_ZOOM_OUT,
|
|
9
|
-
MODE_2D_PAN,
|
|
10
|
-
MODE_3D_VIEW,
|
|
11
|
-
MODE_3D_FIRST_PERSON,
|
|
12
|
-
MODE_WAITING_DRAWING_LINE,
|
|
13
|
-
MODE_DRAWING_LINE,
|
|
14
|
-
MODE_DRAWING_HOLE,
|
|
15
|
-
MODE_DRAWING_ITEM,
|
|
16
|
-
MODE_DRAGGING_LINE,
|
|
17
|
-
MODE_DRAGGING_VERTEX,
|
|
18
|
-
MODE_DRAGGING_ITEM,
|
|
19
|
-
MODE_DRAGGING_HOLE,
|
|
20
|
-
MODE_FITTING_IMAGE,
|
|
21
|
-
MODE_UPLOADING_IMAGE,
|
|
22
|
-
MODE_ROTATING_ITEM,
|
|
23
|
-
MODE_IDLE_3D,
|
|
24
|
-
MODE_DRAGGING_ITEM_3D,
|
|
25
|
-
MODE_ROTATING_ITEM_3D,
|
|
26
|
-
MODE_DRAWING_HOLE_3D,
|
|
27
|
-
MODE_DRAGGING_HOLE_3D
|
|
28
|
-
} from '../../../constants';
|
|
29
|
-
import ElementEditor from './element-editor';
|
|
30
|
-
|
|
31
|
-
export default function PanelElementEditor(
|
|
32
|
-
{ state, planData, categoryData, getLinearOfMolding },
|
|
33
|
-
{ projectActions, translator }
|
|
34
|
-
) {
|
|
35
|
-
let { scene, mode } = state;
|
|
36
|
-
|
|
37
|
-
if (
|
|
38
|
-
![
|
|
39
|
-
MODE_IDLE,
|
|
40
|
-
MODE_2D_ZOOM_IN,
|
|
41
|
-
MODE_2D_ZOOM_OUT,
|
|
42
|
-
MODE_2D_PAN,
|
|
43
|
-
MODE_3D_VIEW,
|
|
44
|
-
MODE_3D_FIRST_PERSON,
|
|
45
|
-
MODE_WAITING_DRAWING_LINE,
|
|
46
|
-
MODE_DRAWING_LINE,
|
|
47
|
-
MODE_DRAWING_HOLE,
|
|
48
|
-
MODE_DRAWING_ITEM,
|
|
49
|
-
MODE_DRAGGING_LINE,
|
|
50
|
-
MODE_DRAGGING_VERTEX,
|
|
51
|
-
MODE_DRAGGING_ITEM,
|
|
52
|
-
MODE_DRAGGING_HOLE,
|
|
53
|
-
MODE_ROTATING_ITEM,
|
|
54
|
-
MODE_UPLOADING_IMAGE,
|
|
55
|
-
MODE_FITTING_IMAGE,
|
|
56
|
-
MODE_IDLE_3D,
|
|
57
|
-
MODE_DRAGGING_ITEM_3D,
|
|
58
|
-
MODE_ROTATING_ITEM_3D,
|
|
59
|
-
MODE_DRAWING_HOLE_3D,
|
|
60
|
-
MODE_DRAGGING_HOLE_3D
|
|
61
|
-
].includes(mode)
|
|
62
|
-
)
|
|
63
|
-
return null;
|
|
64
|
-
|
|
65
|
-
let componentRenderer = (element, layer) => (
|
|
66
|
-
<Panel
|
|
67
|
-
isUrl={false}
|
|
68
|
-
key={element.id}
|
|
69
|
-
name={translator.t('Properties: [{0}] {1}', element.type, element.id)}
|
|
70
|
-
opened={true}
|
|
71
|
-
>
|
|
72
|
-
{/* <div style={{padding: '5px 15px'}}> */}
|
|
73
|
-
|
|
74
|
-
<ElementEditor
|
|
75
|
-
element={element}
|
|
76
|
-
layer={layer}
|
|
77
|
-
state={state}
|
|
78
|
-
planData={planData}
|
|
79
|
-
categoryData={categoryData}
|
|
80
|
-
getLinearOfMolding={getLinearOfMolding}
|
|
81
|
-
/>
|
|
82
|
-
{/* </div> */}
|
|
83
|
-
</Panel>
|
|
84
|
-
);
|
|
85
|
-
|
|
86
|
-
let layerRenderer = layer =>
|
|
87
|
-
Seq()
|
|
88
|
-
.concat(layer.lines, layer.holes, layer.areas, layer.items)
|
|
89
|
-
.filter(element => element.selected)
|
|
90
|
-
.map(element => componentRenderer(element, layer))
|
|
91
|
-
.valueSeq();
|
|
92
|
-
|
|
93
|
-
return <div>{scene.layers.valueSeq().map(layerRenderer)}</div>;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
PanelElementEditor.propTypes = {
|
|
97
|
-
state: PropTypes.object.isRequired,
|
|
98
|
-
planData: PropTypes.object.isRequired
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
PanelElementEditor.contextTypes = {
|
|
102
|
-
projectActions: PropTypes.object.isRequired,
|
|
103
|
-
translator: PropTypes.object.isRequired
|
|
104
|
-
};
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import React, { Component } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import Panel from '../panel';
|
|
4
|
-
import { Seq } from 'immutable';
|
|
5
|
-
import {
|
|
6
|
-
MODE_IDLE,
|
|
7
|
-
MODE_2D_ZOOM_IN,
|
|
8
|
-
MODE_2D_ZOOM_OUT,
|
|
9
|
-
MODE_2D_PAN,
|
|
10
|
-
MODE_3D_VIEW,
|
|
11
|
-
MODE_3D_FIRST_PERSON,
|
|
12
|
-
MODE_WAITING_DRAWING_LINE,
|
|
13
|
-
MODE_DRAWING_LINE,
|
|
14
|
-
MODE_DRAWING_HOLE,
|
|
15
|
-
MODE_DRAWING_ITEM,
|
|
16
|
-
MODE_DRAGGING_LINE,
|
|
17
|
-
MODE_DRAGGING_VERTEX,
|
|
18
|
-
MODE_DRAGGING_ITEM,
|
|
19
|
-
MODE_DRAGGING_HOLE,
|
|
20
|
-
MODE_FITTING_IMAGE,
|
|
21
|
-
MODE_UPLOADING_IMAGE,
|
|
22
|
-
MODE_ROTATING_ITEM
|
|
23
|
-
} from '../../../constants';
|
|
24
|
-
import { FormSelect } from '../../../components/style/export';
|
|
25
|
-
import { Group } from '../../../class/export';
|
|
26
|
-
|
|
27
|
-
const tableStyle = { width: '100%' };
|
|
28
|
-
const firstTdStyle = { width: '6em' };
|
|
29
|
-
|
|
30
|
-
export default class PanelMultiElementsEditor extends Component {
|
|
31
|
-
//export default function PanelMultiElementsEditor({state}, {projectActions, translator}) {
|
|
32
|
-
constructor(props, context) {
|
|
33
|
-
super(props, context);
|
|
34
|
-
|
|
35
|
-
this.state = {
|
|
36
|
-
selectedGroupID: ''
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
addSelectToGroup(state, groupID, layerID, selecteds) {
|
|
41
|
-
if (!groupID || groupID === '' || !selecteds || !selecteds.size) return;
|
|
42
|
-
|
|
43
|
-
console.log('need to be added to group', groupID, 'elements', selecteds);
|
|
44
|
-
|
|
45
|
-
/*let selectedJs = selecteds.toJS();
|
|
46
|
-
|
|
47
|
-
for( let lineID in selectedJs.lines ) Group.addElement( state, groupID, layerID, 'lines', lineID );*/
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
render() {
|
|
51
|
-
let { mode } = this.props.state;
|
|
52
|
-
|
|
53
|
-
if (
|
|
54
|
-
![
|
|
55
|
-
MODE_IDLE,
|
|
56
|
-
MODE_2D_ZOOM_IN,
|
|
57
|
-
MODE_2D_ZOOM_OUT,
|
|
58
|
-
MODE_2D_PAN,
|
|
59
|
-
MODE_3D_VIEW,
|
|
60
|
-
MODE_3D_FIRST_PERSON,
|
|
61
|
-
MODE_WAITING_DRAWING_LINE,
|
|
62
|
-
MODE_DRAWING_LINE,
|
|
63
|
-
MODE_DRAWING_HOLE,
|
|
64
|
-
MODE_DRAWING_ITEM,
|
|
65
|
-
MODE_DRAGGING_LINE,
|
|
66
|
-
MODE_DRAGGING_VERTEX,
|
|
67
|
-
MODE_DRAGGING_ITEM,
|
|
68
|
-
MODE_DRAGGING_HOLE,
|
|
69
|
-
MODE_ROTATING_ITEM,
|
|
70
|
-
MODE_UPLOADING_IMAGE,
|
|
71
|
-
MODE_FITTING_IMAGE
|
|
72
|
-
].includes(mode)
|
|
73
|
-
)
|
|
74
|
-
return null;
|
|
75
|
-
|
|
76
|
-
let groups = this.props.state.getIn(['scene', 'groups']);
|
|
77
|
-
|
|
78
|
-
//TODO change in multi-layer check
|
|
79
|
-
let selectedLayer = this.props.state.getIn(['scene', 'selectedLayer']);
|
|
80
|
-
let selecteds = this.props.state.getIn([
|
|
81
|
-
'scene',
|
|
82
|
-
'layers',
|
|
83
|
-
selectedLayer,
|
|
84
|
-
'selected'
|
|
85
|
-
]);
|
|
86
|
-
|
|
87
|
-
return (
|
|
88
|
-
<Panel name={'Multiselected'} opened={true}>
|
|
89
|
-
<div style={{ padding: '5px 15px' }}>
|
|
90
|
-
<p>Multiselection tab</p>
|
|
91
|
-
<table style={tableStyle}>
|
|
92
|
-
<tbody>
|
|
93
|
-
<tr>
|
|
94
|
-
<td style={firstTdStyle}>Add to Group</td>
|
|
95
|
-
<td>
|
|
96
|
-
<FormSelect
|
|
97
|
-
value={this.state.selectedGroupID}
|
|
98
|
-
onChange={e =>
|
|
99
|
-
this.setState({ selectedGroupID: e.target.value })
|
|
100
|
-
}
|
|
101
|
-
>
|
|
102
|
-
<option key={0} value={''}></option>
|
|
103
|
-
{groups.entrySeq().map(([groupID, group]) => (
|
|
104
|
-
<option key={groupID} value={groupID}>
|
|
105
|
-
{group.get('name')}
|
|
106
|
-
</option>
|
|
107
|
-
))}
|
|
108
|
-
</FormSelect>
|
|
109
|
-
</td>
|
|
110
|
-
<td
|
|
111
|
-
style={{
|
|
112
|
-
cursor: 'pointer',
|
|
113
|
-
padding: '0.5em 0',
|
|
114
|
-
textAlign: 'center'
|
|
115
|
-
}}
|
|
116
|
-
onClick={e => {
|
|
117
|
-
if (
|
|
118
|
-
!this.state.selectedGroupID ||
|
|
119
|
-
this.state.selectedGroupID === '' ||
|
|
120
|
-
!selecteds ||
|
|
121
|
-
!selecteds.size
|
|
122
|
-
)
|
|
123
|
-
return;
|
|
124
|
-
|
|
125
|
-
let selectedJs = selecteds.toJS();
|
|
126
|
-
|
|
127
|
-
for (let x = 0; x < selectedJs.lines.length; x++)
|
|
128
|
-
this.context.groupsActions.addToGroup(
|
|
129
|
-
this.state.selectedGroupID,
|
|
130
|
-
selectedLayer,
|
|
131
|
-
'lines',
|
|
132
|
-
selectedJs.lines[x]
|
|
133
|
-
);
|
|
134
|
-
}}
|
|
135
|
-
>
|
|
136
|
-
+
|
|
137
|
-
</td>
|
|
138
|
-
</tr>
|
|
139
|
-
</tbody>
|
|
140
|
-
</table>
|
|
141
|
-
</div>
|
|
142
|
-
</Panel>
|
|
143
|
-
);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
PanelMultiElementsEditor.propTypes = {
|
|
148
|
-
state: PropTypes.object.isRequired
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
PanelMultiElementsEditor.contextTypes = {
|
|
152
|
-
projectActions: PropTypes.object.isRequired,
|
|
153
|
-
groupsActions: PropTypes.object.isRequired,
|
|
154
|
-
translator: PropTypes.object.isRequired
|
|
155
|
-
};
|
|
@@ -1,272 +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 { FormNumberInput, FormTextInput } from '../style/export';
|
|
6
|
-
import { Map } from 'immutable';
|
|
7
|
-
|
|
8
|
-
import { FaUnlink } from 'react-icons/fa';
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
MODE_IDLE,
|
|
12
|
-
MODE_2D_ZOOM_IN,
|
|
13
|
-
MODE_2D_ZOOM_OUT,
|
|
14
|
-
MODE_2D_PAN,
|
|
15
|
-
MODE_3D_VIEW,
|
|
16
|
-
MODE_3D_FIRST_PERSON,
|
|
17
|
-
MODE_WAITING_DRAWING_LINE,
|
|
18
|
-
MODE_DRAWING_LINE,
|
|
19
|
-
MODE_DRAWING_HOLE,
|
|
20
|
-
MODE_DRAWING_ITEM,
|
|
21
|
-
MODE_DRAGGING_LINE,
|
|
22
|
-
MODE_DRAGGING_VERTEX,
|
|
23
|
-
MODE_DRAGGING_ITEM,
|
|
24
|
-
MODE_DRAGGING_HOLE,
|
|
25
|
-
MODE_FITTING_IMAGE,
|
|
26
|
-
MODE_UPLOADING_IMAGE,
|
|
27
|
-
MODE_ROTATING_ITEM,
|
|
28
|
-
MODE_IDLE_3D,
|
|
29
|
-
MODE_DRAGGING_ITEM_3D,
|
|
30
|
-
MODE_ROTATING_ITEM_3D
|
|
31
|
-
} from '../../constants';
|
|
32
|
-
|
|
33
|
-
const VISIBILITY_MODE = {
|
|
34
|
-
MODE_IDLE,
|
|
35
|
-
MODE_2D_ZOOM_IN,
|
|
36
|
-
MODE_2D_ZOOM_OUT,
|
|
37
|
-
MODE_2D_PAN,
|
|
38
|
-
MODE_3D_VIEW,
|
|
39
|
-
MODE_3D_FIRST_PERSON,
|
|
40
|
-
MODE_WAITING_DRAWING_LINE,
|
|
41
|
-
MODE_DRAWING_LINE,
|
|
42
|
-
MODE_DRAWING_HOLE,
|
|
43
|
-
MODE_DRAWING_ITEM,
|
|
44
|
-
MODE_DRAGGING_LINE,
|
|
45
|
-
MODE_DRAGGING_VERTEX,
|
|
46
|
-
MODE_DRAGGING_ITEM,
|
|
47
|
-
MODE_DRAGGING_HOLE,
|
|
48
|
-
MODE_FITTING_IMAGE,
|
|
49
|
-
MODE_UPLOADING_IMAGE,
|
|
50
|
-
MODE_ROTATING_ITEM,
|
|
51
|
-
MODE_IDLE_3D,
|
|
52
|
-
MODE_DRAGGING_ITEM_3D,
|
|
53
|
-
MODE_ROTATING_ITEM_3D
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
const tableStyle = { width: '100%' };
|
|
57
|
-
const firstTdStyle = { width: '6em' };
|
|
58
|
-
const inputStyle = { textAlign: 'left' };
|
|
59
|
-
const styleEditButton = {
|
|
60
|
-
marginLeft: '5px',
|
|
61
|
-
border: '0px',
|
|
62
|
-
background: 'none',
|
|
63
|
-
color: SharedStyle.COLORS.white,
|
|
64
|
-
fontSize: '14px',
|
|
65
|
-
outline: '0px'
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
const tablegroupStyle = {
|
|
69
|
-
width: '100%',
|
|
70
|
-
cursor: 'pointer',
|
|
71
|
-
maxHeight: '20em',
|
|
72
|
-
marginLeft: '1px',
|
|
73
|
-
marginTop: '1em'
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
const iconColStyle = { width: '2em' };
|
|
77
|
-
|
|
78
|
-
export default class PanelGroupEditor extends Component {
|
|
79
|
-
constructor(props, context) {
|
|
80
|
-
super(props, context);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
shouldComponentUpdate(nextProps, nextState) {
|
|
84
|
-
return true;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
componentWillReceiveProps(nextProps, nextContext) {}
|
|
88
|
-
|
|
89
|
-
render() {
|
|
90
|
-
if (!this.props.groupID || !VISIBILITY_MODE[this.props.state.mode])
|
|
91
|
-
return null;
|
|
92
|
-
|
|
93
|
-
let group = this.props.state.getIn(['scene', 'groups', this.props.groupID]);
|
|
94
|
-
let elements = group.get('elements');
|
|
95
|
-
|
|
96
|
-
return (
|
|
97
|
-
<Panel
|
|
98
|
-
name={this.context.translator.t('Group [{0}]', group.get('name'))}
|
|
99
|
-
opened={true}
|
|
100
|
-
>
|
|
101
|
-
<div style={{ padding: '5px 15px' }}>
|
|
102
|
-
<table style={tableStyle}>
|
|
103
|
-
<tbody>
|
|
104
|
-
<tr>
|
|
105
|
-
<td style={firstTdStyle}>
|
|
106
|
-
{this.context.translator.t('Name')}
|
|
107
|
-
</td>
|
|
108
|
-
<td>
|
|
109
|
-
<FormTextInput
|
|
110
|
-
value={group.get('name')}
|
|
111
|
-
onChange={e =>
|
|
112
|
-
this.context.groupsActions.setGroupAttributes(
|
|
113
|
-
this.props.groupID,
|
|
114
|
-
new Map({ name: e.target.value })
|
|
115
|
-
)
|
|
116
|
-
}
|
|
117
|
-
style={inputStyle}
|
|
118
|
-
/>
|
|
119
|
-
</td>
|
|
120
|
-
</tr>
|
|
121
|
-
<tr>
|
|
122
|
-
<td style={firstTdStyle}>X</td>
|
|
123
|
-
<td>
|
|
124
|
-
<FormNumberInput
|
|
125
|
-
value={group.get('x')}
|
|
126
|
-
onChange={e =>
|
|
127
|
-
this.context.groupsActions.groupTranslate(
|
|
128
|
-
this.props.groupID,
|
|
129
|
-
e.target.value,
|
|
130
|
-
group.get('y')
|
|
131
|
-
)
|
|
132
|
-
}
|
|
133
|
-
style={inputStyle}
|
|
134
|
-
state={this.props.state}
|
|
135
|
-
precision={2}
|
|
136
|
-
/>
|
|
137
|
-
</td>
|
|
138
|
-
</tr>
|
|
139
|
-
<tr>
|
|
140
|
-
<td style={firstTdStyle}>Y</td>
|
|
141
|
-
<td>
|
|
142
|
-
<FormNumberInput
|
|
143
|
-
value={group.get('y')}
|
|
144
|
-
onChange={e =>
|
|
145
|
-
this.context.groupsActions.groupTranslate(
|
|
146
|
-
this.props.groupID,
|
|
147
|
-
group.get('x'),
|
|
148
|
-
e.target.value
|
|
149
|
-
)
|
|
150
|
-
}
|
|
151
|
-
style={inputStyle}
|
|
152
|
-
state={this.props.state}
|
|
153
|
-
precision={2}
|
|
154
|
-
/>
|
|
155
|
-
</td>
|
|
156
|
-
</tr>
|
|
157
|
-
<tr>
|
|
158
|
-
<td style={firstTdStyle}>
|
|
159
|
-
{this.context.translator.t('Rotation')}
|
|
160
|
-
</td>
|
|
161
|
-
<td>
|
|
162
|
-
<FormNumberInput
|
|
163
|
-
value={group.get('rotation')}
|
|
164
|
-
onChange={e =>
|
|
165
|
-
this.context.groupsActions.groupRotate(
|
|
166
|
-
this.props.groupID,
|
|
167
|
-
e.target.value
|
|
168
|
-
)
|
|
169
|
-
}
|
|
170
|
-
style={inputStyle}
|
|
171
|
-
state={this.props.state}
|
|
172
|
-
precision={2}
|
|
173
|
-
/>
|
|
174
|
-
</td>
|
|
175
|
-
</tr>
|
|
176
|
-
</tbody>
|
|
177
|
-
</table>
|
|
178
|
-
{elements.size ? (
|
|
179
|
-
<div>
|
|
180
|
-
<p
|
|
181
|
-
style={{
|
|
182
|
-
textAlign: 'center',
|
|
183
|
-
borderBottom: SharedStyle.PRIMARY_COLOR.border,
|
|
184
|
-
paddingBottom: '1em'
|
|
185
|
-
}}
|
|
186
|
-
>
|
|
187
|
-
{this.context.translator.t("Group's Elements")}
|
|
188
|
-
</p>
|
|
189
|
-
<table style={tablegroupStyle}>
|
|
190
|
-
<thead>
|
|
191
|
-
<tr>
|
|
192
|
-
<th style={iconColStyle}></th>
|
|
193
|
-
<th>{this.context.translator.t('Layer')}</th>
|
|
194
|
-
<th>{this.context.translator.t('Prototype')}</th>
|
|
195
|
-
<th>{this.context.translator.t('Name')}</th>
|
|
196
|
-
</tr>
|
|
197
|
-
</thead>
|
|
198
|
-
<tbody>
|
|
199
|
-
{elements.entrySeq().map(([layerID, layerElements]) => {
|
|
200
|
-
return layerElements
|
|
201
|
-
.entrySeq()
|
|
202
|
-
.map(([elementPrototype, ElementList]) => {
|
|
203
|
-
return ElementList.valueSeq().map(elementID => {
|
|
204
|
-
let element = this.props.state.getIn([
|
|
205
|
-
'scene',
|
|
206
|
-
'layers',
|
|
207
|
-
layerID,
|
|
208
|
-
elementPrototype,
|
|
209
|
-
elementID
|
|
210
|
-
]);
|
|
211
|
-
|
|
212
|
-
return (
|
|
213
|
-
<tr key={elementID}>
|
|
214
|
-
<td
|
|
215
|
-
style={iconColStyle}
|
|
216
|
-
title={this.context.translator.t(
|
|
217
|
-
'Un-chain Element from Group'
|
|
218
|
-
)}
|
|
219
|
-
>
|
|
220
|
-
<FaUnlink
|
|
221
|
-
onClick={e =>
|
|
222
|
-
this.context.groupsActions.removeFromGroup(
|
|
223
|
-
this.props.groupID,
|
|
224
|
-
layerID,
|
|
225
|
-
elementPrototype,
|
|
226
|
-
elementID
|
|
227
|
-
)
|
|
228
|
-
}
|
|
229
|
-
style={styleEditButton}
|
|
230
|
-
/>
|
|
231
|
-
</td>
|
|
232
|
-
<td style={{ textAlign: 'center' }}>{layerID}</td>
|
|
233
|
-
<td
|
|
234
|
-
style={{
|
|
235
|
-
textAlign: 'center',
|
|
236
|
-
textTransform: 'capitalize'
|
|
237
|
-
}}
|
|
238
|
-
>
|
|
239
|
-
{elementPrototype}
|
|
240
|
-
</td>
|
|
241
|
-
<td style={{ textAlign: 'center' }}>
|
|
242
|
-
{element.name}
|
|
243
|
-
</td>
|
|
244
|
-
</tr>
|
|
245
|
-
);
|
|
246
|
-
});
|
|
247
|
-
});
|
|
248
|
-
})}
|
|
249
|
-
</tbody>
|
|
250
|
-
</table>
|
|
251
|
-
</div>
|
|
252
|
-
) : null}
|
|
253
|
-
</div>
|
|
254
|
-
</Panel>
|
|
255
|
-
);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
PanelGroupEditor.propTypes = {
|
|
260
|
-
state: PropTypes.object.isRequired,
|
|
261
|
-
groupID: PropTypes.string
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
PanelGroupEditor.contextTypes = {
|
|
265
|
-
catalog: PropTypes.object.isRequired,
|
|
266
|
-
translator: PropTypes.object.isRequired,
|
|
267
|
-
itemsActions: PropTypes.object.isRequired,
|
|
268
|
-
linesActions: PropTypes.object.isRequired,
|
|
269
|
-
holesActions: PropTypes.object.isRequired,
|
|
270
|
-
groupsActions: PropTypes.object.isRequired,
|
|
271
|
-
projectActions: PropTypes.object.isRequired
|
|
272
|
-
};
|