kitchen-simulator 5.0.0-test.4 → 5.0.0-test.5
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 +1 -2
- package/src/@history.js +0 -3
- package/src/AppContext.js +0 -5
- package/src/KitchenConfigurator.jsx +0 -1517
- package/src/KitchenConfiguratorApp.jsx +0 -443
- package/src/actions/area-actions.js +0 -15
- package/src/actions/export.js +0 -38
- package/src/actions/groups-actions.js +0 -102
- package/src/actions/holes-actions.js +0 -152
- package/src/actions/items-actions.js +0 -393
- package/src/actions/lines-actions.js +0 -103
- package/src/actions/project-actions.js +0 -391
- package/src/actions/scene-actions.js +0 -44
- package/src/actions/user-actions.js +0 -75
- package/src/actions/vertices-actions.js +0 -34
- package/src/actions/viewer2d-actions.js +0 -79
- package/src/actions/viewer3d-actions.js +0 -32
- package/src/catalog/areas/area/planner-element.jsx +0 -43
- package/src/catalog/areas/area/textures/ceramic-tile.jpg +0 -0
- package/src/catalog/areas/area/textures/grass.jpg +0 -0
- package/src/catalog/areas/area/textures/parquet.jpg +0 -0
- package/src/catalog/areas/area/textures/strand-porcelain.jpg +0 -0
- package/src/catalog/areas/area/textures/tile1.jpg +0 -0
- package/src/catalog/back.png +0 -0
- package/src/catalog/catalog.js +0 -258
- package/src/catalog/doors.png +0 -0
- package/src/catalog/doorways.png +0 -0
- package/src/catalog/envMap/nx.hdr +0 -0
- package/src/catalog/envMap/ny.hdr +0 -0
- package/src/catalog/envMap/nz.hdr +0 -0
- package/src/catalog/envMap/px.hdr +0 -0
- package/src/catalog/envMap/py.hdr +0 -0
- package/src/catalog/envMap/pz.hdr +0 -0
- package/src/catalog/factories/area-factory-3d.js +0 -252
- package/src/catalog/factories/area-factory.jsx +0 -102
- package/src/catalog/factories/export.js +0 -9
- package/src/catalog/factories/wall-factory-3d.js +0 -296
- package/src/catalog/factories/wall-factory.jsx +0 -321
- package/src/catalog/holes/door-closet/planner-element.jsx +0 -251
- package/src/catalog/holes/door-double/door_double.png +0 -0
- package/src/catalog/holes/door-double/planner-element.jsx +0 -391
- package/src/catalog/holes/door-exterior/planner-element.jsx +0 -245
- package/src/catalog/holes/door-interior/planner-element.jsx +0 -256
- package/src/catalog/holes/door-panic/panicDoor.png +0 -0
- package/src/catalog/holes/door-panic/planner-element.jsx +0 -594
- package/src/catalog/holes/door-panic-double/panicDoorDouble.png +0 -0
- package/src/catalog/holes/door-panic-double/planner-element.jsx +0 -574
- package/src/catalog/holes/door-sliding/planner-element.jsx +0 -256
- package/src/catalog/holes/doorway-framed/planner-element.jsx +0 -169
- package/src/catalog/holes/doorway-frameless/planner-element.jsx +0 -116
- package/src/catalog/holes/gate/gate.jpg +0 -0
- package/src/catalog/holes/window-clear/planner-element.jsx +0 -181
- package/src/catalog/holes/window-clear/texture.png +0 -0
- package/src/catalog/holes/window-cross/planner-element.jsx +0 -180
- package/src/catalog/holes/window-cross/texture.png +0 -0
- package/src/catalog/holes/window-double-hung/planner-element.jsx +0 -366
- package/src/catalog/holes/window-double-hung/texture.png +0 -0
- package/src/catalog/holes/window-vertical/planner-element.jsx +0 -290
- package/src/catalog/holes/window-vertical/texture.png +0 -0
- package/src/catalog/lines/wall/planner-element.jsx +0 -73
- package/src/catalog/lines/wall/textures/bricks-normal.jpg +0 -0
- package/src/catalog/lines/wall/textures/bricks-normal2.jpg +0 -0
- package/src/catalog/lines/wall/textures/bricks.jpg +0 -0
- package/src/catalog/lines/wall/textures/bricks2.jpg +0 -0
- package/src/catalog/lines/wall/textures/bricks3.jpg +0 -0
- package/src/catalog/lines/wall/textures/morden-normal.jpg +0 -0
- package/src/catalog/lines/wall/textures/morden.jpg +0 -0
- package/src/catalog/lines/wall/textures/painted-normal.jpg +0 -0
- package/src/catalog/lines/wall/textures/painted.jpg +0 -0
- package/src/catalog/lines/wall/textures/plaster-normal.jpg +0 -0
- package/src/catalog/lines/wall/textures/plaster.jpg +0 -0
- package/src/catalog/lines/wall/wall.png +0 -0
- package/src/catalog/molding/molding-dcm/planner-element.jsx +0 -35
- package/src/catalog/molding/molding-dcm/texture.png +0 -0
- package/src/catalog/molding/molding-fbm/planner-element.jsx +0 -35
- package/src/catalog/molding/molding-fbm/texture.png +0 -0
- package/src/catalog/molding/molding-lrm/planner-element.jsx +0 -35
- package/src/catalog/molding/molding-lrm/texture.png +0 -0
- package/src/catalog/properties/export.js +0 -33
- package/src/catalog/properties/property-checkbox.jsx +0 -123
- package/src/catalog/properties/property-color.jsx +0 -52
- package/src/catalog/properties/property-enum.jsx +0 -87
- package/src/catalog/properties/property-hidden.jsx +0 -22
- package/src/catalog/properties/property-lenght-measure.jsx +0 -113
- package/src/catalog/properties/property-length-measure.jsx +0 -129
- package/src/catalog/properties/property-length-measure_hole.jsx +0 -110
- package/src/catalog/properties/property-number.jsx +0 -63
- package/src/catalog/properties/property-read-only.jsx +0 -37
- package/src/catalog/properties/property-string.jsx +0 -59
- package/src/catalog/properties/property-toggle.jsx +0 -51
- package/src/catalog/properties/shared-property-style.js +0 -13
- package/src/catalog/utils/FuseUtils.js +0 -61
- package/src/catalog/utils/exporter.js +0 -173
- package/src/catalog/utils/geom-utils.js +0 -301
- package/src/catalog/utils/item-loader.jsx +0 -2122
- package/src/catalog/utils/load-obj.js +0 -113
- package/src/catalog/utils/mtl-loader.js +0 -462
- package/src/catalog/utils/obj-loader.js +0 -544
- package/src/catalog/windows.png +0 -0
- package/src/class/FuseUtils.js +0 -61
- package/src/class/area.js +0 -159
- package/src/class/export.js +0 -37
- package/src/class/group.js +0 -565
- package/src/class/guide.js +0 -44
- package/src/class/hole.js +0 -1359
- package/src/class/item.js +0 -2050
- package/src/class/layer.js +0 -926
- package/src/class/line.js +0 -1780
- package/src/class/project.js +0 -875
- package/src/class/vertex.js +0 -409
- package/src/components/atoms/Snackbar/index.jsx +0 -43
- package/src/components/atoms/radio-button/index.jsx +0 -20
- package/src/components/atoms/radio-button/styles.js +0 -56
- package/src/components/button/MainButton.jsx +0 -157
- package/src/components/button/ToggleMeasureButton.jsx +0 -65
- 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/content.jsx +0 -136
- 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/molecules/slider/index.jsx +0 -15
- package/src/components/molecules/slider/styles.js +0 -0
- package/src/components/molecules/slider/styles.scss +0 -3
- 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/style/button.jsx +0 -95
- package/src/components/style/cancel-button.jsx +0 -20
- package/src/components/style/content-container.jsx +0 -29
- package/src/components/style/content-title.jsx +0 -20
- package/src/components/style/delete-button.jsx +0 -23
- package/src/components/style/export.jsx +0 -48
- package/src/components/style/form-block.jsx +0 -13
- package/src/components/style/form-color-input.jsx +0 -27
- package/src/components/style/form-label.jsx +0 -15
- package/src/components/style/form-number-input.jsx +0 -196
- package/src/components/style/form-number-input_2.jsx +0 -191
- package/src/components/style/form-select.jsx +0 -38
- package/src/components/style/form-slider.jsx +0 -36
- package/src/components/style/form-submit-button.jsx +0 -23
- package/src/components/style/form-text-input.jsx +0 -65
- 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/tutorial-view/Modal.jsx +0 -584
- package/src/components/tutorial-view/style.css +0 -111
- package/src/components/tutorial-view/styles.js +0 -65
- package/src/components/viewer2d/area.jsx +0 -98
- package/src/components/viewer2d/export.js +0 -48
- package/src/components/viewer2d/grids/grid-horizontal-streak.jsx +0 -40
- package/src/components/viewer2d/grids/grid-streak.jsx +0 -32
- package/src/components/viewer2d/grids/grid-vertical-streak.jsx +0 -41
- package/src/components/viewer2d/grids/grids.jsx +0 -30
- package/src/components/viewer2d/group.jsx +0 -57
- package/src/components/viewer2d/item.jsx +0 -618
- package/src/components/viewer2d/layer.jsx +0 -214
- package/src/components/viewer2d/line.jsx +0 -1358
- package/src/components/viewer2d/ruler.jsx +0 -136
- package/src/components/viewer2d/rulerDist.jsx +0 -192
- package/src/components/viewer2d/rulerX.jsx +0 -141
- package/src/components/viewer2d/rulerY.jsx +0 -138
- package/src/components/viewer2d/scene.jsx +0 -94
- package/src/components/viewer2d/snap.jsx +0 -118
- package/src/components/viewer2d/state.jsx +0 -77
- package/src/components/viewer2d/utils.js +0 -195
- package/src/components/viewer2d/vertex.jsx +0 -76
- package/src/components/viewer2d/viewer2d.jsx +0 -1830
- package/src/components/viewer3d/camera-controls-module/camera-controls.module.js +0 -3078
- package/src/components/viewer3d/dcm.js +0 -226
- package/src/components/viewer3d/fbm.js +0 -383
- package/src/components/viewer3d/front3D.jsx +0 -63
- package/src/components/viewer3d/grid-creator.js +0 -25
- package/src/components/viewer3d/grids/grid-horizontal-streak.js +0 -41
- package/src/components/viewer3d/grids/grid-streak.js +0 -34
- package/src/components/viewer3d/grids/grid-vertical-streak.js +0 -42
- package/src/components/viewer3d/libs/first-person-controls.js +0 -70
- package/src/components/viewer3d/libs/helvetiker_regular.typeface.js +0 -1265
- package/src/components/viewer3d/libs/mtl-loader.js +0 -462
- package/src/components/viewer3d/libs/obj-loader.js +0 -653
- package/src/components/viewer3d/libs/orbit-controls.js +0 -945
- package/src/components/viewer3d/libs/pointer-lock-controls.js +0 -67
- package/src/components/viewer3d/lrm.js +0 -358
- package/src/components/viewer3d/model.js +0 -830
- package/src/components/viewer3d/pointer-lock-navigation.js +0 -140
- package/src/components/viewer3d/ruler-utils/itemRect.jsx +0 -91
- package/src/components/viewer3d/ruler-utils/layer3D.jsx +0 -528
- package/src/components/viewer3d/ruler-utils/ruler3D.jsx +0 -218
- package/src/components/viewer3d/ruler-utils/scene3D.jsx +0 -87
- package/src/components/viewer3d/ruler-utils/state3D.jsx +0 -25
- package/src/components/viewer3d/scene-creator.js +0 -5172
- package/src/components/viewer3d/three-memory-cleaner.js +0 -65
- package/src/components/viewer3d/viewer3d-first-person.js +0 -395
- package/src/components/viewer3d/viewer3d.js +0 -3376
- 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/constants.js +0 -731
- package/src/hooks/useCheckCart.js +0 -38
- package/src/hooks/useGetPricesBySku.js +0 -59
- package/src/hooks/useValidateToken.js +0 -181
- package/src/index.js +0 -32
- package/src/models.js +0 -541
- package/src/plugins/SVGLoader.js +0 -1991
- package/src/plugins/autosave.js +0 -39
- package/src/plugins/console-debugger.js +0 -36
- package/src/plugins/export.js +0 -11
- package/src/plugins/keyboard.js +0 -194
- package/src/reducers/areas-reducer.js +0 -13
- package/src/reducers/export.js +0 -39
- package/src/reducers/groups-reducer.js +0 -73
- package/src/reducers/holes-reducer.js +0 -125
- package/src/reducers/items-reducer.js +0 -286
- package/src/reducers/lines-reducer.js +0 -96
- package/src/reducers/project-reducer.js +0 -239
- package/src/reducers/reducer.js +0 -59
- package/src/reducers/scene-reducer.js +0 -41
- package/src/reducers/user-reducer.js +0 -30
- package/src/reducers/vertices-reducer.js +0 -34
- package/src/reducers/viewer2d-reducer.js +0 -81
- package/src/reducers/viewer3d-reducer.js +0 -65
- package/src/shared-style.js +0 -72
- package/src/styles/export.js +0 -7
- package/src/styles/tabs.css +0 -40
- package/src/translator/en.js +0 -106
- package/src/translator/it.js +0 -80
- package/src/translator/ru.js +0 -80
- package/src/translator/translator.js +0 -81
- package/src/utils/browser.js +0 -36
- package/src/utils/email-validator.js +0 -5
- package/src/utils/export.js +0 -39
- package/src/utils/geometry.js +0 -2572
- package/src/utils/get-edges-of-subgraphs.js +0 -29
- package/src/utils/graph-cycles.js +0 -259
- package/src/utils/graph-inner-cycles.js +0 -49
- package/src/utils/graph.js +0 -147
- package/src/utils/helper.js +0 -431
- package/src/utils/history.js +0 -37
- package/src/utils/id-broker.js +0 -9
- package/src/utils/logger.js +0 -8
- package/src/utils/math.js +0 -51
- package/src/utils/molding.js +0 -973
- package/src/utils/name-generator.js +0 -5
- package/src/utils/objects-utils.js +0 -56
- package/src/utils/phone-validator.js +0 -4
- package/src/utils/process-black-list.js +0 -10
- package/src/utils/react-if.jsx +0 -20
- package/src/utils/snap-scene.js +0 -102
- package/src/utils/snap.js +0 -184
- package/src/utils/threeCSG.es6.js +0 -578
- package/src/version.js +0 -1
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
import { Item, Area } from '../class/export';
|
|
2
|
-
import { history } from '../utils/export';
|
|
3
|
-
import {
|
|
4
|
-
TOGGLE_LOADING_CABINET,
|
|
5
|
-
SELECT_TOOL_DRAWING_ITEM,
|
|
6
|
-
UPDATE_DRAWING_ITEM,
|
|
7
|
-
END_DRAWING_ITEM,
|
|
8
|
-
BEGIN_DRAGGING_ITEM,
|
|
9
|
-
BEGIN_DRAGGING_ITEM_3D,
|
|
10
|
-
UPDATE_DRAGGING_ITEM,
|
|
11
|
-
UPDATE_DRAGGING_ITEM_CHANGED,
|
|
12
|
-
UPDATE_DRAGGING_ITEM_3DX,
|
|
13
|
-
UPDATE_DRAGGING_ITEM_3DY,
|
|
14
|
-
END_DRAGGING_ITEM,
|
|
15
|
-
END_DRAGGING_ITEM_3D,
|
|
16
|
-
BEGIN_ROTATING_ITEM,
|
|
17
|
-
BEGIN_ROTATING_ITEM_3D,
|
|
18
|
-
UPDATE_ROTATING,
|
|
19
|
-
UPDATE_ROTATING_ITEM,
|
|
20
|
-
UPDATE_ROTATING_ITEM_CHANGED,
|
|
21
|
-
END_ROTATING_ITEM,
|
|
22
|
-
END_ROTATING_ITEM_3D,
|
|
23
|
-
REPLACE_SUBMODULE,
|
|
24
|
-
SELECT_ITEM,
|
|
25
|
-
ANIMATE_OBJECT,
|
|
26
|
-
REMOVE_REPLACE_SUBMODULE,
|
|
27
|
-
ITEM_MOVE_UP,
|
|
28
|
-
SELECT_TOOL_DRAWING_ITEM_3D,
|
|
29
|
-
SET_DOOR_STYLE,
|
|
30
|
-
SET_HANDLE_MATERIAL,
|
|
31
|
-
SET_INITIAL_DOOR_STYLE,
|
|
32
|
-
UPDATE_ITEM_POSITION,
|
|
33
|
-
SET_DOOR_HANDLE,
|
|
34
|
-
SET_WALL_COLOR,
|
|
35
|
-
END_CREATING_CABINET,
|
|
36
|
-
UPDATE_POPUP_OPEN,
|
|
37
|
-
SET_MODELLING,
|
|
38
|
-
SET_COUNTER_TOP,
|
|
39
|
-
SET_BACKSPLASH,
|
|
40
|
-
SET_BACKSPLASH_VISIBLE,
|
|
41
|
-
SET_APPLIANCE_MATERIAL,
|
|
42
|
-
DUPLICATE_SELECTED,
|
|
43
|
-
EDIT_WIDTH,
|
|
44
|
-
END_LOADING,
|
|
45
|
-
SET_MOLDING,
|
|
46
|
-
UPDATE_MOLDING,
|
|
47
|
-
STORE_DIST_ARRAY,
|
|
48
|
-
VALIDATE_ITEM_POSTIONS,
|
|
49
|
-
REPLACE_ITEM
|
|
50
|
-
// SET_MOVE_STATUS,
|
|
51
|
-
// SET_ROTATE_STATUS
|
|
52
|
-
} from '../constants';
|
|
53
|
-
|
|
54
|
-
export default function (state, action) {
|
|
55
|
-
switch (action.type) {
|
|
56
|
-
case STORE_DIST_ARRAY:
|
|
57
|
-
return Item.storeDistArray(
|
|
58
|
-
state,
|
|
59
|
-
action.layerID,
|
|
60
|
-
action.itemID,
|
|
61
|
-
action.distArray
|
|
62
|
-
).updatedState;
|
|
63
|
-
case VALIDATE_ITEM_POSTIONS:
|
|
64
|
-
return Item.validateItemPositions(state, action.layerID).updatedState;
|
|
65
|
-
case END_LOADING:
|
|
66
|
-
return Item.endLoading(state).updatedState;
|
|
67
|
-
case TOGGLE_LOADING_CABINET:
|
|
68
|
-
return Item.toggleLoadingCabinet(state).updatedState;
|
|
69
|
-
case EDIT_WIDTH:
|
|
70
|
-
return Item.editWidth(
|
|
71
|
-
state,
|
|
72
|
-
action.newWidth,
|
|
73
|
-
action.layerID,
|
|
74
|
-
action.itemID
|
|
75
|
-
).updatedState;
|
|
76
|
-
case DUPLICATE_SELECTED:
|
|
77
|
-
return Item.duplicateSelected(state, action.currentObject).updatedState;
|
|
78
|
-
case END_CREATING_CABINET:
|
|
79
|
-
return Item.endCreatingCabinet(state).updatedState;
|
|
80
|
-
case UPDATE_POPUP_OPEN:
|
|
81
|
-
return Item.updatePopupOpen(state, action.value).updatedState;
|
|
82
|
-
case SELECT_ITEM:
|
|
83
|
-
return Item.select(state, action.layerID, action.itemID).updatedState;
|
|
84
|
-
case SELECT_TOOL_DRAWING_ITEM:
|
|
85
|
-
state = state.merge({
|
|
86
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
87
|
-
});
|
|
88
|
-
return Item.selectToolDrawingItem(
|
|
89
|
-
state,
|
|
90
|
-
action.sceneComponentType,
|
|
91
|
-
action.oStyle
|
|
92
|
-
).updatedState;
|
|
93
|
-
case REPLACE_ITEM:
|
|
94
|
-
return Item.replaceItem(
|
|
95
|
-
state,
|
|
96
|
-
action.selectedPos,
|
|
97
|
-
action.currentObject,
|
|
98
|
-
action.selectedObject
|
|
99
|
-
).updatedState;
|
|
100
|
-
case UPDATE_DRAWING_ITEM:
|
|
101
|
-
return Item.updateDrawingItem(state, action.layerID, action.x, action.y)
|
|
102
|
-
.updatedState;
|
|
103
|
-
|
|
104
|
-
case END_DRAWING_ITEM:
|
|
105
|
-
state = state.merge({
|
|
106
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
107
|
-
});
|
|
108
|
-
return Item.endDrawingItem(state, action.layerID, action.x, action.y)
|
|
109
|
-
.updatedState;
|
|
110
|
-
|
|
111
|
-
case BEGIN_DRAGGING_ITEM:
|
|
112
|
-
state = state.merge({
|
|
113
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
114
|
-
});
|
|
115
|
-
return Item.beginDraggingItem(
|
|
116
|
-
state,
|
|
117
|
-
action.layerID,
|
|
118
|
-
action.itemID,
|
|
119
|
-
action.x,
|
|
120
|
-
action.y
|
|
121
|
-
).updatedState;
|
|
122
|
-
|
|
123
|
-
case BEGIN_DRAGGING_ITEM_3D:
|
|
124
|
-
state = state.merge({
|
|
125
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
126
|
-
});
|
|
127
|
-
return Item.beginDraggingItem3D(
|
|
128
|
-
state,
|
|
129
|
-
action.layerID,
|
|
130
|
-
action.itemID,
|
|
131
|
-
action.x,
|
|
132
|
-
action.y
|
|
133
|
-
).updatedState;
|
|
134
|
-
|
|
135
|
-
case UPDATE_DRAGGING_ITEM:
|
|
136
|
-
return Item.updateDraggingItem(state, action.x, action.y).updatedState;
|
|
137
|
-
|
|
138
|
-
case UPDATE_DRAGGING_ITEM_CHANGED:
|
|
139
|
-
return Item.updateDraggingItemChanged(
|
|
140
|
-
state,
|
|
141
|
-
action.x,
|
|
142
|
-
action.y,
|
|
143
|
-
action.layerID,
|
|
144
|
-
action.itemID
|
|
145
|
-
).updatedState;
|
|
146
|
-
|
|
147
|
-
case UPDATE_DRAGGING_ITEM_3DX:
|
|
148
|
-
return Item.updateDraggingItem3DX(state, action.x).updatedState;
|
|
149
|
-
|
|
150
|
-
case UPDATE_DRAGGING_ITEM_3DY:
|
|
151
|
-
return Item.updateDraggingItem3DY(state, action.y).updatedState;
|
|
152
|
-
|
|
153
|
-
case END_DRAGGING_ITEM:
|
|
154
|
-
state = state.merge({
|
|
155
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
156
|
-
});
|
|
157
|
-
return Item.endDraggingItem(state, action.x, action.y).updatedState;
|
|
158
|
-
|
|
159
|
-
case END_DRAGGING_ITEM_3D:
|
|
160
|
-
state = state.merge({
|
|
161
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
162
|
-
});
|
|
163
|
-
return Item.endDraggingItem3D(state).updatedState;
|
|
164
|
-
|
|
165
|
-
case BEGIN_ROTATING_ITEM:
|
|
166
|
-
state = state.merge({
|
|
167
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
168
|
-
});
|
|
169
|
-
return Item.beginRotatingItem(
|
|
170
|
-
state,
|
|
171
|
-
action.layerID,
|
|
172
|
-
action.itemID,
|
|
173
|
-
action.x,
|
|
174
|
-
action.y
|
|
175
|
-
).updatedState;
|
|
176
|
-
|
|
177
|
-
case BEGIN_ROTATING_ITEM_3D:
|
|
178
|
-
state = state.merge({
|
|
179
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
180
|
-
});
|
|
181
|
-
return Item.beginRotatingItem3D(
|
|
182
|
-
state,
|
|
183
|
-
action.layerID,
|
|
184
|
-
action.itemID,
|
|
185
|
-
action.x,
|
|
186
|
-
action.y,
|
|
187
|
-
action.centerX,
|
|
188
|
-
action.centerY
|
|
189
|
-
).updatedState;
|
|
190
|
-
|
|
191
|
-
case UPDATE_ROTATING_ITEM:
|
|
192
|
-
return Item.updateRotatingItem(state, action.x, action.y).updatedState;
|
|
193
|
-
|
|
194
|
-
case UPDATE_ROTATING_ITEM_CHANGED:
|
|
195
|
-
return Item.updateRotatingItemChanged(
|
|
196
|
-
state,
|
|
197
|
-
action.rotation,
|
|
198
|
-
action.layerID,
|
|
199
|
-
action.itemID
|
|
200
|
-
).updatedState;
|
|
201
|
-
|
|
202
|
-
case END_ROTATING_ITEM:
|
|
203
|
-
state = state.merge({
|
|
204
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
205
|
-
});
|
|
206
|
-
return Item.endRotatingItem(state, action.x, action.y).updatedState;
|
|
207
|
-
|
|
208
|
-
case END_ROTATING_ITEM_3D:
|
|
209
|
-
state = state.merge({
|
|
210
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
211
|
-
});
|
|
212
|
-
return Item.endRotatingItem3D(state, action.x, action.y).updatedState;
|
|
213
|
-
|
|
214
|
-
case REPLACE_SUBMODULE:
|
|
215
|
-
state = state.merge({
|
|
216
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
217
|
-
});
|
|
218
|
-
return Item.replaceSubmodule(state, action.url).updatedState;
|
|
219
|
-
case ANIMATE_OBJECT:
|
|
220
|
-
// state = state.merge({ sceneHistory: history.historyPush(state.sceneHistory, state.scene) });
|
|
221
|
-
return Item.animateObject(state, action.value).updatedState;
|
|
222
|
-
case REMOVE_REPLACE_SUBMODULE:
|
|
223
|
-
return Item.removeReplacingSupport(state).updatedState;
|
|
224
|
-
case ITEM_MOVE_UP:
|
|
225
|
-
return Item.updateItemsAltitude(
|
|
226
|
-
state,
|
|
227
|
-
action.layerID,
|
|
228
|
-
action.itemID,
|
|
229
|
-
action.value
|
|
230
|
-
).updatedState;
|
|
231
|
-
case SELECT_TOOL_DRAWING_ITEM_3D:
|
|
232
|
-
return Item.selectToolDrawingItem3D(state, action.sceneComponentType)
|
|
233
|
-
.updatedState;
|
|
234
|
-
case SET_DOOR_STYLE:
|
|
235
|
-
return Item.setDoorStyle(
|
|
236
|
-
state,
|
|
237
|
-
action.doorStyle,
|
|
238
|
-
action.pathes,
|
|
239
|
-
action.isAll
|
|
240
|
-
).updatedState;
|
|
241
|
-
case SET_HANDLE_MATERIAL:
|
|
242
|
-
return Item.setHandleMaterial(state, action.material).updatedState;
|
|
243
|
-
case SET_DOOR_HANDLE:
|
|
244
|
-
return Item.setDoorHandle(state, action.doorHandle).updatedState;
|
|
245
|
-
case SET_COUNTER_TOP:
|
|
246
|
-
return Item.setCounterTop(state, action.counterTop).updatedState;
|
|
247
|
-
case SET_MOLDING:
|
|
248
|
-
return Item.setMolding(state, action.molding, action.isAll).updatedState;
|
|
249
|
-
case UPDATE_MOLDING:
|
|
250
|
-
return Item.updateMolding(state).updatedState;
|
|
251
|
-
case SET_WALL_COLOR:
|
|
252
|
-
state = state.merge({
|
|
253
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
254
|
-
}); // save history when this actino performed,so undo enable
|
|
255
|
-
return Item.setWallColor(state, action.wallColor).updatedState;
|
|
256
|
-
case SET_MODELLING:
|
|
257
|
-
return Item.setModelling(state, action.model).updatedState;
|
|
258
|
-
case SET_BACKSPLASH:
|
|
259
|
-
return Item.setBacksplash(state, action.backsplash).updatedState;
|
|
260
|
-
case SET_BACKSPLASH_VISIBLE:
|
|
261
|
-
return Item.setBacksplashVisible(
|
|
262
|
-
state,
|
|
263
|
-
action.itemID,
|
|
264
|
-
action.backsplashVisible
|
|
265
|
-
).updatedState;
|
|
266
|
-
case SET_APPLIANCE_MATERIAL:
|
|
267
|
-
return Item.setApplianceMaterial(state, action.material).updatedState;
|
|
268
|
-
case SET_INITIAL_DOOR_STYLE:
|
|
269
|
-
return Item.setInitialDoorStyle(state, action.doorStyle, action.oStyle)
|
|
270
|
-
.updatedState;
|
|
271
|
-
|
|
272
|
-
case UPDATE_ITEM_POSITION:
|
|
273
|
-
return Item.updateItemPosition(
|
|
274
|
-
state,
|
|
275
|
-
action.layerID,
|
|
276
|
-
action.itemID,
|
|
277
|
-
action.pos
|
|
278
|
-
).updatedState;
|
|
279
|
-
// case SET_MOVE_STATUS:
|
|
280
|
-
// return state.merge({ moveStatus: action.status });
|
|
281
|
-
// case SET_ROTATE_STATUS:
|
|
282
|
-
// return state.merge({ rotateStatus: action.status });
|
|
283
|
-
default:
|
|
284
|
-
return state;
|
|
285
|
-
}
|
|
286
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { Line } from '../class/export';
|
|
2
|
-
import { history } from '../utils/export';
|
|
3
|
-
import {
|
|
4
|
-
SELECT_TOOL_DRAWING_LINE,
|
|
5
|
-
BEGIN_DRAWING_LINE,
|
|
6
|
-
UPDATE_DRAWING_LINE,
|
|
7
|
-
END_DRAWING_LINE,
|
|
8
|
-
BEGIN_DRAGGING_LINE,
|
|
9
|
-
UPDATE_DRAGGING_LINE,
|
|
10
|
-
END_DRAGGING_LINE,
|
|
11
|
-
SELECT_LINE,
|
|
12
|
-
STOP_DRAWING_LINE,
|
|
13
|
-
SET_RELATED_LINE
|
|
14
|
-
} from '../constants';
|
|
15
|
-
|
|
16
|
-
export default function (state, action) {
|
|
17
|
-
switch (action.type) {
|
|
18
|
-
case SELECT_TOOL_DRAWING_LINE:
|
|
19
|
-
sessionStorage.setItem('hintTextShow', true);
|
|
20
|
-
setTimeout(() => {
|
|
21
|
-
sessionStorage.setItem('hintTextShow', false);
|
|
22
|
-
}, 500);
|
|
23
|
-
return Line.selectToolDrawingLine(state, action.sceneComponentType)
|
|
24
|
-
.updatedState;
|
|
25
|
-
|
|
26
|
-
case BEGIN_DRAWING_LINE:
|
|
27
|
-
state = state.merge({
|
|
28
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
29
|
-
});
|
|
30
|
-
return Line.beginDrawingLine(state, action.layerID, action.x, action.y)
|
|
31
|
-
.updatedState;
|
|
32
|
-
|
|
33
|
-
case UPDATE_DRAWING_LINE:
|
|
34
|
-
return Line.updateDrawingLine(
|
|
35
|
-
state,
|
|
36
|
-
action.x,
|
|
37
|
-
action.y,
|
|
38
|
-
action.relatedLines
|
|
39
|
-
).updatedState;
|
|
40
|
-
|
|
41
|
-
case STOP_DRAWING_LINE:
|
|
42
|
-
return Line.stopDrawingLine(state).updatedState;
|
|
43
|
-
|
|
44
|
-
case END_DRAWING_LINE:
|
|
45
|
-
state = state.merge({
|
|
46
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
47
|
-
});
|
|
48
|
-
return Line.endDrawingLine(state, action.x, action.y, action.relatedLines)
|
|
49
|
-
.updatedState;
|
|
50
|
-
|
|
51
|
-
case BEGIN_DRAGGING_LINE:
|
|
52
|
-
state = state.merge({
|
|
53
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
54
|
-
});
|
|
55
|
-
return Line.beginDraggingLine(
|
|
56
|
-
state,
|
|
57
|
-
action.layerID,
|
|
58
|
-
action.lineID,
|
|
59
|
-
action.x,
|
|
60
|
-
action.y
|
|
61
|
-
).updatedState;
|
|
62
|
-
|
|
63
|
-
case UPDATE_DRAGGING_LINE:
|
|
64
|
-
return Line.updateDraggingLine(
|
|
65
|
-
state,
|
|
66
|
-
action.x,
|
|
67
|
-
action.y,
|
|
68
|
-
action.relatedLines
|
|
69
|
-
).updatedState;
|
|
70
|
-
|
|
71
|
-
case END_DRAGGING_LINE:
|
|
72
|
-
state = state.merge({
|
|
73
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
74
|
-
});
|
|
75
|
-
return Line.endDraggingLine(
|
|
76
|
-
state,
|
|
77
|
-
action.x,
|
|
78
|
-
action.y,
|
|
79
|
-
action.relatedLines
|
|
80
|
-
).updatedState;
|
|
81
|
-
|
|
82
|
-
case SELECT_LINE:
|
|
83
|
-
return Line.select(state, action.layerID, action.lineID).updatedState;
|
|
84
|
-
|
|
85
|
-
case SET_RELATED_LINE:
|
|
86
|
-
return Line.setRelatedLine(
|
|
87
|
-
state,
|
|
88
|
-
action.layerID,
|
|
89
|
-
action.lineID,
|
|
90
|
-
action.intersection
|
|
91
|
-
).updatedState;
|
|
92
|
-
|
|
93
|
-
default:
|
|
94
|
-
return state;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
import { history } from '../utils/export';
|
|
2
|
-
import {
|
|
3
|
-
LOAD_PROJECT,
|
|
4
|
-
NEW_PROJECT,
|
|
5
|
-
OPEN_CATALOG,
|
|
6
|
-
SELECT_TOOL_EDIT,
|
|
7
|
-
MODE_IDLE,
|
|
8
|
-
UNSELECT_ALL,
|
|
9
|
-
SELECT_ALL,
|
|
10
|
-
SET_PROPERTIES,
|
|
11
|
-
SET_ITEMS_ATTRIBUTES,
|
|
12
|
-
SET_LINES_ATTRIBUTES,
|
|
13
|
-
SET_HOLES_ATTRIBUTES,
|
|
14
|
-
REMOVE,
|
|
15
|
-
INVERT,
|
|
16
|
-
UNDO,
|
|
17
|
-
REDO,
|
|
18
|
-
RECREATE,
|
|
19
|
-
UNCREATE,
|
|
20
|
-
PROJECT_RE_NAME,
|
|
21
|
-
ROLLBACK,
|
|
22
|
-
SET_PROJECT_PROPERTIES,
|
|
23
|
-
SET_PROJECT_ID,
|
|
24
|
-
OPEN_PROJECT_CONFIGURATOR,
|
|
25
|
-
INIT_CATALOG,
|
|
26
|
-
UPDATE_MOUSE_COORDS,
|
|
27
|
-
UPDATE_ZOOM_SCALE,
|
|
28
|
-
TOGGLE_SNAP,
|
|
29
|
-
CHANGE_CATALOG_PAGE,
|
|
30
|
-
GO_BACK_TO_CATALOG_PAGE,
|
|
31
|
-
THROW_ERROR,
|
|
32
|
-
THROW_WARNING,
|
|
33
|
-
COPY_PROPERTIES,
|
|
34
|
-
PASTE_PROPERTIES,
|
|
35
|
-
PUSH_LAST_SELECTED_CATALOG_ELEMENT_TO_HISTORY,
|
|
36
|
-
ALTERATE_STATE,
|
|
37
|
-
SET_MODE,
|
|
38
|
-
ADD_HORIZONTAL_GUIDE,
|
|
39
|
-
ADD_VERTICAL_GUIDE,
|
|
40
|
-
ADD_CIRCULAR_GUIDE,
|
|
41
|
-
REMOVE_HORIZONTAL_GUIDE,
|
|
42
|
-
REMOVE_VERTICAL_GUIDE,
|
|
43
|
-
REMOVE_CIRCULAR_GUIDE,
|
|
44
|
-
REMOVE_DRAWING_SUPPORT,
|
|
45
|
-
SET_STATE_PROPERTIES,
|
|
46
|
-
SHIFT2DON,
|
|
47
|
-
SHIFT2DOFF,
|
|
48
|
-
MODE_DRAWING_LINE,
|
|
49
|
-
SET_IS_HELP,
|
|
50
|
-
SET_IS_CABINET_DRAWING
|
|
51
|
-
} from '../constants';
|
|
52
|
-
|
|
53
|
-
import { Project } from '../class/export';
|
|
54
|
-
|
|
55
|
-
export default function (state, action) {
|
|
56
|
-
switch (action.type) {
|
|
57
|
-
case NEW_PROJECT:
|
|
58
|
-
return Project.newProject(state).updatedState;
|
|
59
|
-
|
|
60
|
-
case LOAD_PROJECT:
|
|
61
|
-
return Project.loadProject(state, action.sceneJSON, action.categoryData)
|
|
62
|
-
.updatedState;
|
|
63
|
-
|
|
64
|
-
case OPEN_CATALOG:
|
|
65
|
-
return Project.openCatalog(state).updatedState;
|
|
66
|
-
|
|
67
|
-
case CHANGE_CATALOG_PAGE:
|
|
68
|
-
return Project.changeCatalogPage(state, action.oldPage, action.newPage)
|
|
69
|
-
.updatedState;
|
|
70
|
-
|
|
71
|
-
case GO_BACK_TO_CATALOG_PAGE:
|
|
72
|
-
return Project.goBackToCatalogPage(state, action.newPage).updatedState;
|
|
73
|
-
|
|
74
|
-
case SELECT_TOOL_EDIT:
|
|
75
|
-
return Project.setMode(state, MODE_IDLE).updatedState;
|
|
76
|
-
|
|
77
|
-
case UNSELECT_ALL:
|
|
78
|
-
return Project.unselectAll(state).updatedState;
|
|
79
|
-
case SELECT_ALL:
|
|
80
|
-
return Project.selectAll(state, action.value).updatedState;
|
|
81
|
-
|
|
82
|
-
case SET_PROPERTIES:
|
|
83
|
-
state = state.merge({
|
|
84
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
85
|
-
});
|
|
86
|
-
return Project.setProperties(
|
|
87
|
-
state,
|
|
88
|
-
state.getIn(['scene', 'selectedLayer']),
|
|
89
|
-
action.properties
|
|
90
|
-
).updatedState;
|
|
91
|
-
|
|
92
|
-
case SET_ITEMS_ATTRIBUTES:
|
|
93
|
-
state = state.merge({
|
|
94
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
95
|
-
});
|
|
96
|
-
return Project.setItemsAttributes(state, action.itemsAttributes)
|
|
97
|
-
.updatedState;
|
|
98
|
-
|
|
99
|
-
case SET_LINES_ATTRIBUTES:
|
|
100
|
-
if (state.mode != MODE_DRAWING_LINE)
|
|
101
|
-
state = state.merge({
|
|
102
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
103
|
-
});
|
|
104
|
-
return Project.setLinesAttributes(
|
|
105
|
-
state,
|
|
106
|
-
action.linesAttributes,
|
|
107
|
-
action.isDirect,
|
|
108
|
-
action.directData
|
|
109
|
-
).updatedState;
|
|
110
|
-
|
|
111
|
-
case SET_HOLES_ATTRIBUTES:
|
|
112
|
-
state = state.merge({
|
|
113
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
114
|
-
});
|
|
115
|
-
return Project.setHolesAttributes(state, action.holesAttributes)
|
|
116
|
-
.updatedState;
|
|
117
|
-
|
|
118
|
-
case REMOVE:
|
|
119
|
-
state = state.merge({
|
|
120
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
121
|
-
});
|
|
122
|
-
return Project.remove(state).updatedState;
|
|
123
|
-
|
|
124
|
-
case UNDO:
|
|
125
|
-
return Project.undo(state).updatedState;
|
|
126
|
-
|
|
127
|
-
case REDO:
|
|
128
|
-
return Project.redo(state).updatedState;
|
|
129
|
-
|
|
130
|
-
case UNCREATE:
|
|
131
|
-
return Project.uncreate(state).updatedState;
|
|
132
|
-
|
|
133
|
-
case PROJECT_RE_NAME:
|
|
134
|
-
return Project.rename(state, action.name).updatedState;
|
|
135
|
-
|
|
136
|
-
case RECREATE:
|
|
137
|
-
return Project.recreate(state).updatedState;
|
|
138
|
-
|
|
139
|
-
case SHIFT2DOFF:
|
|
140
|
-
return Project.shift2doff(state).updatedState;
|
|
141
|
-
|
|
142
|
-
case SHIFT2DON:
|
|
143
|
-
return Project.shift2don(state).updatedState;
|
|
144
|
-
|
|
145
|
-
case ROLLBACK:
|
|
146
|
-
return Project.rollback(state).updatedState;
|
|
147
|
-
|
|
148
|
-
case SET_PROJECT_PROPERTIES:
|
|
149
|
-
state = state.merge({
|
|
150
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
151
|
-
});
|
|
152
|
-
return Project.setProjectProperties(state, action.properties)
|
|
153
|
-
.updatedState;
|
|
154
|
-
|
|
155
|
-
case SET_PROJECT_ID:
|
|
156
|
-
state = state.merge({
|
|
157
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
158
|
-
});
|
|
159
|
-
return Project.setProjectId(state, action.id).updatedState;
|
|
160
|
-
|
|
161
|
-
case OPEN_PROJECT_CONFIGURATOR:
|
|
162
|
-
state = state.merge({
|
|
163
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
164
|
-
});
|
|
165
|
-
return Project.openProjectConfigurator(state).updatedState;
|
|
166
|
-
|
|
167
|
-
case INIT_CATALOG:
|
|
168
|
-
return Project.initCatalog(state, action.catalog).updatedState;
|
|
169
|
-
|
|
170
|
-
case UPDATE_MOUSE_COORDS:
|
|
171
|
-
return Project.updateMouseCoord(state, action.coords).updatedState;
|
|
172
|
-
|
|
173
|
-
case UPDATE_ZOOM_SCALE:
|
|
174
|
-
return Project.updateZoomScale(state, action.scale).updatedState;
|
|
175
|
-
|
|
176
|
-
case TOGGLE_SNAP:
|
|
177
|
-
return Project.toggleSnap(state, action.mask).updatedState;
|
|
178
|
-
|
|
179
|
-
case THROW_ERROR:
|
|
180
|
-
return Project.throwError(state, action.error).updatedState;
|
|
181
|
-
|
|
182
|
-
case THROW_WARNING:
|
|
183
|
-
return Project.throwWarning(state, action.warning).updatedState;
|
|
184
|
-
|
|
185
|
-
case COPY_PROPERTIES:
|
|
186
|
-
return Project.copyProperties(state, action.properties).updatedState;
|
|
187
|
-
|
|
188
|
-
case PASTE_PROPERTIES:
|
|
189
|
-
state = state.merge({
|
|
190
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
191
|
-
});
|
|
192
|
-
return Project.pasteProperties(state).updatedState;
|
|
193
|
-
|
|
194
|
-
case PUSH_LAST_SELECTED_CATALOG_ELEMENT_TO_HISTORY:
|
|
195
|
-
return Project.pushLastSelectedCatalogElementToHistory(
|
|
196
|
-
state,
|
|
197
|
-
action.element
|
|
198
|
-
).updatedState;
|
|
199
|
-
|
|
200
|
-
case ALTERATE_STATE:
|
|
201
|
-
return Project.setAlterate(state).updatedState;
|
|
202
|
-
|
|
203
|
-
case SET_MODE:
|
|
204
|
-
return Project.setMode(state, action.mode).updatedState;
|
|
205
|
-
|
|
206
|
-
case ADD_HORIZONTAL_GUIDE:
|
|
207
|
-
state = state.merge({
|
|
208
|
-
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
209
|
-
});
|
|
210
|
-
return Project.addHorizontalGuide(state, action.coordinate).updatedState;
|
|
211
|
-
|
|
212
|
-
case ADD_VERTICAL_GUIDE:
|
|
213
|
-
return Project.addVerticalGuide(state, action.coordinate).updatedState;
|
|
214
|
-
|
|
215
|
-
case ADD_CIRCULAR_GUIDE:
|
|
216
|
-
return Project.addCircularGuide(state, action.x, action.y, action.radius)
|
|
217
|
-
.updatedState;
|
|
218
|
-
|
|
219
|
-
case REMOVE_HORIZONTAL_GUIDE:
|
|
220
|
-
return Project.removeHorizontalGuide(state, action.guideID).updatedState;
|
|
221
|
-
|
|
222
|
-
case REMOVE_VERTICAL_GUIDE:
|
|
223
|
-
return Project.removeVerticalGuide(state, action.guideID).updatedState;
|
|
224
|
-
|
|
225
|
-
case REMOVE_CIRCULAR_GUIDE:
|
|
226
|
-
return Project.removeCircularGuide(state, action.guideID).updatedState;
|
|
227
|
-
case REMOVE_DRAWING_SUPPORT:
|
|
228
|
-
return Project.removeDrawingSupport(state).updatedState;
|
|
229
|
-
case SET_STATE_PROPERTIES:
|
|
230
|
-
return Project.setStateProperties(state, action.properties).updatedState;
|
|
231
|
-
case SET_IS_HELP:
|
|
232
|
-
return Project.setIsHelp(state, action.isHelp).updatedState;
|
|
233
|
-
case SET_IS_CABINET_DRAWING:
|
|
234
|
-
return Project.setIsCabinetDrawing(state, action.isCabinetDrawing)
|
|
235
|
-
.updatedState;
|
|
236
|
-
default:
|
|
237
|
-
return state;
|
|
238
|
-
}
|
|
239
|
-
}
|
package/src/reducers/reducer.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PROJECT_ACTIONS,
|
|
3
|
-
VIEWER2D_ACTIONS,
|
|
4
|
-
VIEWER3D_ACTIONS,
|
|
5
|
-
GROUP_ACTIONS,
|
|
6
|
-
ITEMS_ACTIONS,
|
|
7
|
-
HOLE_ACTIONS,
|
|
8
|
-
LINE_ACTIONS,
|
|
9
|
-
AREA_ACTIONS,
|
|
10
|
-
SCENE_ACTIONS,
|
|
11
|
-
VERTEX_ACTIONS,
|
|
12
|
-
USER_ACTIONS
|
|
13
|
-
} from '../constants';
|
|
14
|
-
|
|
15
|
-
import {
|
|
16
|
-
KitchenConfiguratorAreasReducer,
|
|
17
|
-
KitchenConfiguratorHolesReducer,
|
|
18
|
-
KitchenConfiguratorItemsReducer,
|
|
19
|
-
KitchenConfiguratorLinesReducer,
|
|
20
|
-
KitchenConfiguratorGroupsReducer,
|
|
21
|
-
KitchenConfiguratorProjectReducer,
|
|
22
|
-
KitchenConfiguratorSceneReducer,
|
|
23
|
-
KitchenConfiguratorVerticesReducer,
|
|
24
|
-
KitchenConfiguratorViewer2dReducer,
|
|
25
|
-
KitchenConfiguratorViewer3dReducer,
|
|
26
|
-
KitchenConfiguratorUserReducer
|
|
27
|
-
} from './export';
|
|
28
|
-
|
|
29
|
-
import { State } from '../models';
|
|
30
|
-
|
|
31
|
-
export const initialState = new State();
|
|
32
|
-
|
|
33
|
-
export default function appReducer(state, action) {
|
|
34
|
-
// /////////
|
|
35
|
-
if (PROJECT_ACTIONS[action.type])
|
|
36
|
-
return KitchenConfiguratorProjectReducer(...arguments);
|
|
37
|
-
if (VIEWER2D_ACTIONS[action.type])
|
|
38
|
-
return KitchenConfiguratorViewer2dReducer(...arguments);
|
|
39
|
-
if (VIEWER3D_ACTIONS[action.type])
|
|
40
|
-
return KitchenConfiguratorViewer3dReducer(...arguments);
|
|
41
|
-
if (ITEMS_ACTIONS[action.type])
|
|
42
|
-
return KitchenConfiguratorItemsReducer(...arguments);
|
|
43
|
-
if (HOLE_ACTIONS[action.type])
|
|
44
|
-
return KitchenConfiguratorHolesReducer(...arguments);
|
|
45
|
-
if (LINE_ACTIONS[action.type])
|
|
46
|
-
return KitchenConfiguratorLinesReducer(...arguments);
|
|
47
|
-
if (AREA_ACTIONS[action.type])
|
|
48
|
-
return KitchenConfiguratorAreasReducer(...arguments);
|
|
49
|
-
if (GROUP_ACTIONS[action.type])
|
|
50
|
-
return KitchenConfiguratorGroupsReducer(...arguments);
|
|
51
|
-
if (SCENE_ACTIONS[action.type])
|
|
52
|
-
return KitchenConfiguratorSceneReducer(...arguments);
|
|
53
|
-
if (VERTEX_ACTIONS[action.type])
|
|
54
|
-
return KitchenConfiguratorVerticesReducer(...arguments);
|
|
55
|
-
if (USER_ACTIONS[action.type])
|
|
56
|
-
return KitchenConfiguratorUserReducer(...arguments);
|
|
57
|
-
|
|
58
|
-
return state || initialState;
|
|
59
|
-
}
|